Table of contents
- Cons (interface)
- Nil (interface)
- List (type alias)
- URI (type alias)
- URI (constant)
- instances (constant)
- isEmpty (constant)
- nil (constant)
- nonEmpty (constant)
- ap (function)
- cata (function)
- catac (function)
- chain (function)
- concat (function)
- cons (function)
- filter (function)
- filterc (function)
- find (function)
- findc (function)
- flatten (function)
- foldl (function)
- foldlc (function)
- foldr (function)
- foldrc (function)
- fromArray (function)
- head (function)
- isCons (function)
- isNil (function)
- last (function)
- lift (function)
- map (function)
- of (function)
- reverse (function)
- size (function)
- snoc (function)
- tail (function)
- toArray (function)
Cons (interface)
Signature
export interface Cons<A> {
readonly _tag: 'cons'
readonly head: A
readonly tail: List<A>
}
Nil (interface)
Signature
export interface Nil {
readonly _tag: 'nil'
}
List (type alias)
Signature
export type List<A> = Cons<A> | Nil
URI (type alias)
Signature
export type URI = typeof URI
URI (constant)
Signature
export const URI = ...
instances (constant)
Signature
export const instances: Monad1<URI> = ...
isEmpty (constant)
Signature
export const isEmpty = ...
nil (constant)
Signature
export const nil: List<never> = ...
nonEmpty (constant)
Signature
export const nonEmpty = ...
ap (function)
Signature
export function ap<A, B>(list: List<A>, fns: List<FunctionN<[A], B>>): List<B> { ... }
cata (function)
Signature
export function cata<A, B>(list: List<A>, ifCons: FunctionN<[A, List<A>], B>, ifNil: Lazy<B>): B { ... }
catac (function)
Signature
export function catac<A, B>(ifCons: FunctionN<[A, List<A>], B>, ifNil: Lazy<B>): FunctionN<[List<A>], B> { ... }
chain (function)
Signature
export function chain<A, B>(list: List<A>, f: FunctionN<[A], List<B>>): List<B> { ... }
concat (function)
Signature
export function concat<A>(front: List<A>, back: List<A>): List<A> { ... }
cons (function)
Signature
export function cons<A>(h: A, t: List<A>): List<A> { ... }
filter (function)
Signature
export function filter<A>(list: List<A>, f: Predicate<A>): List<A> { ... }
filterc (function)
Signature
export function filterc<A>(f: Predicate<A>): FunctionN<[List<A>], List<A>> { ... }
find (function)
Signature
export function find<A>(list: List<A>, f: Predicate<A>): Option<A> { ... }
findc (function)
Signature
export function findc<A>(f: Predicate<A>): FunctionN<[List<A>], Option<A>> { ... }
flatten (function)
Signature
export function flatten<A>(list: List<List<A>>): List<A> { ... }
foldl (function)
Signature
export function foldl<A, B>(list: List<A>, b: B, f: FunctionN<[B, A], B>): B { ... }
foldlc (function)
Signature
export function foldlc<A, B>(b: B, f: FunctionN<[B, A], B>): FunctionN<[List<A>], B> { ... }
foldr (function)
Signature
export function foldr<A, B>(list: List<A>, b: B, f: FunctionN<[A, B], B>): B { ... }
foldrc (function)
Signature
export function foldrc<A, B>(b: B, f: FunctionN<[A, B], B>): FunctionN<[List<A>], B> { ... }
fromArray (function)
Signature
export function fromArray<A>(as: readonly A[]): List<A> { ... }
head (function)
Signature
export function head<A>(list: List<A>): Option<A> { ... }
isCons (function)
Signature
export function isCons<A>(list: List<A>): list is Cons<A> { ... }
isNil (function)
Signature
export function isNil<A>(list: List<A>): list is Nil { ... }
last (function)
Signature
export function last<A>(list: List<A>): Option<A> { ... }
lift (function)
Signature
export function lift<A, B>(f: FunctionN<[A], B>): FunctionN<[List<A>], List<B>> { ... }
map (function)
Signature
export function map<A, B>(list: List<A>, f: FunctionN<[A], B>): List<B> { ... }
of (function)
Signature
export function of<A>(a: A): List<A> { ... }
reverse (function)
Signature
export function reverse<A>(list: List<A>): List<A> { ... }
size (function)
Get the size of a list.
This has pathologically bad performance.
Signature
export function size(list: List<unknown>): number { ... }
snoc (function)
Signature
export function snoc<A>(append: A, list: List<A>): List<A> { ... }
tail (function)
Signature
export function tail<A>(list: List<A>): Option<List<A>> { ... }
toArray (function)
Signature
export function toArray<A>(as: List<A>): A[] { ... }