Package-level declarations

Types

Link copied to clipboard
class Chain<A> : K1<Chain.T, A> , Monoid<A, Chain<A>> , Iterable<A>

A catenable sequence with O(1) concatenation, prepend and append.

Link copied to clipboard

Align instance for Chain with the empty chain as the empty structure.

Link copied to clipboard

Applicative instance for Chain with cartesian-product semantics.

Link copied to clipboard

Filterable instance for Chain, preserving the order of the kept elements.

Link copied to clipboard

Foldable instance for Chain.

Link copied to clipboard

Functor instance for Chain.

Link copied to clipboard

Monad instance for Chain; bind concatenates the produced chains in O(1) each.

Link copied to clipboard

Semialign instance for Chain; the result is as long as the longer chain.

Link copied to clipboard

Traversable instance for Chain.

Link copied to clipboard
Link copied to clipboard

Zip instance for Chain; the result is as long as the shorter chain.

Functions

Link copied to clipboard
fun <A> chainOf(vararg values: A): Chain<A>

Creates a Chain from the given values.

Link copied to clipboard
fun <A> List<A>.toChain(): Chain<A>

Wraps this List in a Chain without copying it.