Append 2 list together returning the new list
Modulefoundation-0.0.30Haskell2010
Foundation.List.ListN
A Nat-sized list abstraction
Using this module is limited to GHC 7.10 and above.
- 1 type
- 50 values
- Packagefoundation-0.0.30
- Exports51
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceListN.hs
prepend an element to the list
Create a new list of size n, repeately calling f from 0 to n-1
Same as create but apply an offset
Drop elements from a list keeping the m remaining elements
Check if a list contains the element a
Create an empty list of a
Fold all elements from left
Fold all elements from left strictly
Fold all elements from left strictly with a first element as the accumulator
Fold all elements from right
Fold all elements from right assuming at least one element is in the list.
Get the head element of a list
Get the i'the element
Get the i'th elements
This only works with TypeApplication:
indexStatic @1 (toListN_ [1,2,3] :: ListN 3 Int)Get the list with the last element missing
Get the length of a list
Map all elements in a list
Map each element of a List to a monadic action, evaluate these actions sequentially and collect the results
Map each element of a List to a monadic action, evaluate these actions sequentially and ignore the results
Map all elements in a list with an additional index
Get the maximum element of a list
Get the minimum element of a list
Create a list of n elements where each element is the element in argument
performs a monadic action n times, gathering the results in a List of size n.
Reverse a list
scanl is similar to foldl, but returns a list of successive
reduced values from the left
scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]scanl1 is a variant of scanl that has no starting value argument:
scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]Evaluate each monadic action in the list sequentially, and collect the results.
Evaluate each monadic action in the list sequentially, and ignore the results.
create a list of 1 element
append an element to the list
Split a list into two, returning 2 lists
Get the tail of a list
Take m elements from the beggining of the list.
The number of elements need to be less or equal to the list in argument
Try to create a ListN from a List, succeeding if the length is correct
Create a ListN from a List, expecting a given length
If this list contains more or less than the expected length of the resulting type, then an asynchronous error is raised. use toListN for a more friendly functions
Decompose a list into its head and tail.
Decompose a list into its first elements and the last.
Unzip a list of tuple, to 2 List of the deconstructed tuples
Update the value in a list at a specific location
Zip 2 lists of the same size, returning a new list of the tuple of each elements
Zip 3 lists of the same size
Zip 4 lists of the same size
Zip 5 lists of the same size
Zip 2 lists using a function
Zip 3 lists using a function
Zip 4 lists using a function
Zip 5 lists using a function
A Typed-level sized List equivalent to [a]
Instances12Eq, Ord, Show, Generic, NormalForm, Foldable, …
Eq a => Eq (ListN n a)Defined in basement-0.0.16 · Basement.Sized.ListOrd a => Ord (ListN n a)Defined in basement-0.0.16 · Basement.Sized.ListShow a => Show (ListN n a)Defined in basement-0.0.16 · Basement.Sized.ListGeneric (ListN n a)Defined in basement-0.0.16 · Basement.Sized.ListNormalForm a => NormalForm (ListN n a)Defined in basement-0.0.16 · Basement.Sized.ListFoldable (ListN n a)Defined in foundation-0.0.30 · Foundation.Collection.Foldable(Arbitrary a, KnownNat n, NatWithinBound Int n) => Arbitrary (ListN n a)Defined in foundation-0.0.30 · Foundation.Check.ArbitraryCopy (ListN n ty)Defined in foundation-0.0.30 · Foundation.Collection.CopyDefined in foundation-0.0.30 · Foundation.Collection.Foldable1
<= n => Fold1able (ListN n a)(NatWithinBound Int n, KnownNat n) => IndexedCollection (ListN n a)Defined in foundation-0.0.30 · Foundation.Collection.Indexedtype Rep (ListN n a) = D1 ('MetaDataDefined in basement-0.0.16 · Basement.Sized.List"ListN"
"Basement.Sized.List"
"basement-0.0.16-4Rjtu2106K4CeXvqsnTdeA"
'True) (C1 ('MetaCons"ListN"
'PrefixI 'True) (S1 ('MetaSel ('Just"unListN"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))type Element (ListN n a) = aDefined in foundation-0.0.30 · Foundation.Collection.Element