Natural.nth0: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/spec/math/natural.bend as Natural Lines 98-106 of bend-collections-laws-math@1.0.0.0/spec/math/natural.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/spec/math/natural.bend&start_line=98&end_line=106 import Base # xs[i], or dflt past the end def nth0(+xs: List<&2, Nat>, +i: Nat, +dflt: Nat) -> Nat: match xs i: case Nil{} i0: dflt case Con{x, t} 0n: x case Con{x, t} 1n+j: nth0(t, j, dflt) Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat