Module
Type.Data.List
- Package
- purescript-typelevel-lists
- Repository
- PureFunctor/purescript-typelevel-lists
Type-level heterogenous list of kinds for PureScript
#Cons' Source
data Cons' :: forall k. k -> List' k -> List' k
Prepends an item to a List'
, creating a new List'
.
Instances
IsMember x (Cons' x xs) True
(IsMember x ys r) => IsMember x (Cons' y ys) r
(Concat xs ys zs) => Concat (Cons' x xs) ys (Cons' x zs)
IsEmpty (Cons' x xs) False
(Init' z zs ws) => Init' y (Cons' z zs) (Cons' y ws)
(Init' x xs ys) => Init (Cons' x xs) ys
Last (Cons' x Nil') x
(Last xs ys) => Last (Cons' x xs) ys
(SumInt n P1 m, Length' xs m r) => Length' (Cons' x xs) n r
(SumInt n N1 m, Take m xs ys) => Take n (Cons' x xs) (Cons' x ys)
(SumInt n N1 m, Drop m xs ys) => Drop n (Cons' x xs) ys
(Zip xs ys zs) => Zip (Cons' x xs) (Cons' y ys) (Cons' (Tuple x y) zs)
(Map f xs ys) => Map f (Cons' x xs) (Cons' (f x) ys)
(Fold f (f z x) xs r) => Fold f z (Cons' x xs) r
Foldr f z (Cons' x Nil') (f x z)
(Foldr f z xs r) => Foldr f z (Cons' x xs) (f x r)
#Drop Source
#Fold Source
class Fold :: forall k. (k -> k -> k) -> k -> List' k -> k -> Constraint
class Fold f z xs r | f z xs -> r where
Folds a List'
into a singular value, left-associative.
Members
fold :: forall fproxy kproxy lproxy. fproxy f -> kproxy z -> lproxy xs -> kproxy r
Instances
#Foldr Source
class Foldr :: forall k. (k -> k -> k) -> k -> List' k -> k -> Constraint
class Foldr f z xs r | f z xs -> r where
Folds a List'
into a singular value, right-associative.
Members
foldr :: forall fproxy kproxy lproxy. fproxy f -> kproxy z -> lproxy xs -> kproxy r
Instances
#IsMember Source
class IsMember :: forall k. k -> List' k -> Boolean -> Constraint
class IsMember x xs r | x xs -> r where
Performs membership testing given an item and a List'
.
Members
Instances
#Take Source
- Modules
- Type.
Data. List