AmlName.nm.path: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_name.bend as AmlName Lines 183-192 of bend-osdev-acpi@0.1.1.0/aml_name.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_name.bend&start_line=183&end_line=192 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B def nm.path(ss: List<&2, B.Octets>) -> List<&2, U32>: match ss: case Nil{}: [0] case Con{s, Nil{}}: nm.segs.list([s]) case Con{s1, Con{s2, Nil{}}}: Con{46, nm.segs.list([s1, s2])} case Con{s1, Con{s2, Con{s3, +t}}}: Con{47, Con{U32.from_nat(Nat.add(3n, nm.len(t))), nm.segs.list(Con{s1, Con{s2, Con{s3, t}}})}} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_name.bend&name=nm.len https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_name.bend&name=nm.segs.list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets