def take

bend-collections-laws-math@1.0.0.0 · spec/math/random/chacha8rand.bend:147

import bend-collections-laws-math@1.0.0.0/spec/math/random/chacha8rand.bend as Chacha8rand
import Base

147def take(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
148  match n xs:
149    case 0n _:
150      []
151    case 1n+p Nil{}:
152      []
153    case 1n+p Con{x, rest}:
154      Con{x, take(p, rest)}

Uses (3)

Used by (1)