cons

abstract fun cons(): Prism<S, Pair<A, S>>(source)

Provides a Prism between S and its first element A and tail S.


open infix fun A.cons(tail: S): S(source)

Prepend an element A to the first element of S.

Receiver

A element to prepend or attach on left side of tail.