def unique.print.go

bend-kit-json@0.7.0.0 · json.bend:745

import bend-kit-json@0.7.0.0/json.bend as Json
import Base

745# Reads from the last word down and prepends, so acc ends in index order.
746def unique.print.go(n: Nat, r: Array<U32> & U32, +i: U32, acc: List<&2, U32>) -> Array<U32> & List<&2, U32>:
747  match n:
748    case 0n:
749      (a, w) = r
750      (a, acc)
751    case 1n+p:
752      (a, w) = r
753      unique.print.go(p, Array.get(U32, a, (i - 1 : U32)), (i - 1 : U32), w <> acc)

Uses (8)

Used by (1)