def split.cons

bend-kit-concurrency@0.2.0.0 · concurrency.bend:29

import bend-kit-concurrency@0.2.0.0/concurrency.bend as Concurrency
import Base

29# The first n elements of xs, and the rest.
30def split.cons(-A: Type, h: A, r: List<A> & List<A>) -> List<A> & List<A>:
31  (l, rest) = r
32  (h <> l, rest)

Uses (3)

Used by (1)