:: [t] -> a -package:incipit-base

An implementation of toList for Corecursive fixed-points of XNor.
An unsafe implementation of fromList for Steppable fixed-points of XNor.
The genericLength function is an overloaded version of length. In particular, instead of returning an Int, it returns any type which is an instance of Num. It is, however, less efficient than length.

Examples

>>> genericLength [1, 2, 3] :: Int
3

>>> genericLength [1, 2, 3] :: Float
3.0
Users should take care to pick a return type that is wide enough to contain the full length of the list. If the width is insufficient, the overflow behaviour will depend on the (+) implementation in the selected Num instance. The following example overflows because the actual list length of 200 lies outside of the Int8 range of -128..127.
>>> genericLength [1..200] :: Int8
-56
The genericLength function is an overloaded version of length. In particular, instead of returning an Int, it returns any type which is an instance of Num. It is, however, less efficient than length.
>>> genericLength [1, 2, 3] :: Int
3

>>> genericLength [1, 2, 3] :: Float
3.0
The genericLength function is an overloaded version of length. In particular, instead of returning an Int, it returns any type which is an instance of Num. It is, however, less efficient than length.
>>> genericLength [1, 2, 3] :: Int
3

>>> genericLength [1, 2, 3] :: Float
3.0
Users should take care to pick a return type that is wide enough to contain the full length of the list. If the width is insufficient, the overflow behaviour will depend on the (+) implementation in the selected Num instance. The following example overflows because the actual list length of 200 lies outside of the Int8 range of -128..127.
>>> genericLength [1..200] :: Int8
-56
Left associative length computation that is appropriate for types like Integer.
Right associative length computation that is appropriate for types like Peano number.
Default definition for norm that is based on Foldable class.
Default definition for norm that is based on Foldable class and the argument vector has at least one component.
A type safe generalisation of take. For example
> let count = [1..] :: [Int]
> takeT count :: Maybe (Int, Int)
Just (1,2)
> takeT count
:: Maybe (Int, Int, (Int, (Int, Int), Int, Int),
Const Int Bool, Identity (Int, Int), Tagged String Int)
Just (1,2,(3,(4,5),6,7),Const 8,Identity (9,10),Tagged 11)