def take

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/random.bend:58

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/random.bend as Random
import Base

58def take(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
59  match n xs:
60    case 0n _:
61      []
62    case 1n+p Nil{}:
63      []
64    case 1n+p Con{x, rest}:
65      Con{x, take(p, rest)}

Uses (3)

Used by (8)