def prefix

bend-collections@1.0.0.0 · spec/crypto/poly1305.bend:64

import bend-collections@1.0.0.0/spec/crypto/poly1305.bend as Poly1305
import Base

64def prefix(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
65  match n xs:
66    case 0n _: Nil{}
67    case 1n+k Nil{}: Nil{}
68    case 1n+k x <> rest: x <> prefix(k, rest)

Uses (3)

Used by (2)