Entries.ent.go: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/entries.bend as Entries Lines 58-71 of bend-osdev-acpi@0.1.1.0/entries.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/entries.bend&start_line=58&end_line=71 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-acpi@0.1.1.0/error.bend as E # every structure consumes at least 2 bytes, so len(o) steps are enough def ent.go(fuel: Nat, nx: AcpiEntNext, +o: B.Octets, +off: Nat, acc: List<&2, AcpiRawEntry>) -> Result<&2, &2, E.AcpiError, List<&2, AcpiRawEntry>>: match fuel: case 0n: Done{ent.rev(acc, Nil{})} case 1n+p: match nx: case AcpiEntEnd{}: Done{ent.rev(acc, Nil{})} case AcpiEntBad{k}: Fail{E.AcpiBadEntry{off, k}} case AcpiEntOk{k, +l}: +rest = B.Octets.drop(l, o) ent.go(p, ent.next(rest), rest, Nat.add(off, l), Con{AcpiRawEntry{k, off, B.Octets.take(l, o)}, acc}) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/entries.bend&name=AcpiEntNext https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/entries.bend&name=AcpiRawEntry https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/entries.bend&name=ent.next https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/entries.bend&name=ent.rev https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/error.bend&name=AcpiError https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.drop https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.take