def reads.go
import bend-osdev-array@0.1.0.1/check.bend as Checkimport Base
23# the reads of indices from i on, n of them (r: the read of index i)
24def reads.go(n: Nat, +i: U32, r: Array<U32> & U32) -> String:
25 match n:
26 case 0n:
27 (a, x) = r
28 U32.show(x)
29 case 1n+p:
30 (a, x) = r
31 U32.show(x) ++ " " ++ reads.go(p, U32.add(i, 1), Array.get(U32, a, U32.add(i, 1)))