def take.go

bend-osdev-bytes@0.1.1.0 · bytes.bend:268

import bend-osdev-bytes@0.1.1.0/bytes.bend as Bytes
import Base

268def take.go(n: Nat, xs: List<&2, U32>, acc: List<&2, U32>) -> List<&2, U32>:
269  match n:
270    case 0n:
271      acc
272    case 1n+p:
273      match xs:
274        case Nil{}:
275          acc
276        case Con{h, t}:
277          take.go(p, t, Con{h, acc})

Uses (3)

Used by (3)