cons

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

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


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

Prepend an element A to the first element of S.

Receiver

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