Defs.first: def of lawful-bytes@0.1.1.0 Import: import lawful-bytes@0.1.1.0/defs.bend as Defs Lines 73-76 of lawful-bytes@0.1.1.0/defs.bend: https://jend.leeeet.dev/read.txt?path=lawful-bytes@0.1.1.0/defs.bend&start_line=73&end_line=76 import Base # The first index j with from <= j < to where xs has c; to if there is none # (for from <= to <= length(xs), as the laws assume). def first(xs: List<&2, U32>, +from: Nat, +to: Nat, +c: U32) -> Nat: Nat.add(from, run_len(slice(xs, from, Nat.sub(to, from)), c)) 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 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=run_len https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=slice