def take.go
import bend-osdev-bytes@0.1.1.0/bytes.bend as Bytesimport 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})