def oct.put

bend-kit-tar@0.3.0.0 · tar.bend:567

import bend-kit-tar@0.3.0.0/tar.bend as Tar
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

567# n octal digits of v ending at j, written back to front.
568def oct.put(n: Nat, a: Array<U32>, +j: U32, +v: U32) -> Array<U32>:
569  match n:
570    case 0n:
571      a
572    case 1n+p:
573      oct.put(p, Bytes.poke(a, j, (48 + (v .&. 7) : U32)), (j - 1 : U32), (v >> 3n : U32))

Uses (8)

Used by (2)