def take

bend-collections@1.0.0.0 · src/crypto/curve25519/field.bend:54

import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as Field
import Base

54def take(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
55  match n:
56    case 0n:
57      Nil{}
58    case 1n+m:
59      match xs:
60        case Nil{}:
61          Nil{}
62        case Con{x, xt}:
63          Con{x, take(m, xt)}

Uses (3)

Used by (3)