Bytes.shift.go: def of lawful-bytes@0.1.1.0 Import: import lawful-bytes@0.1.1.0/bytes.bend as Bytes Lines 151-159 of lawful-bytes@0.1.1.0/bytes.bend: https://jend.leeeet.dev/read.txt?path=lawful-bytes@0.1.1.0/bytes.bend&start_line=151&end_line=159 import Base import lawful-bytes@0.1.1.0/defs.bend as D # Bytes j + k onwards moved to j; r holds byte j + k. def shift.go(n: Nat, r: D.Bytes & U32, +j: U32, +k: U32) -> D.Bytes: match n: case 0n: (b, x) = r b case 1n+m: (b, +x) = r shift.go(m, at(set(b, j, x), ((j + 1 : U32) + k : U32)), (j + 1 : U32), k) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/bytes.bend&name=at https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/bytes.bend&name=set https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=Bytes