def first

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/ed25519.bend:196

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/ed25519.bend as Ed25519
import Base

196def first(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
197  match n:
198    case 0n:
199      Nil{}
200    case 1n+m:
201      match xs:
202        case Nil{}:
203          Nil{}
204        case Con{x, xt}:
205          Con{x, first(m, xt)}

Uses (3)

Used by (5)