Bytes.at.go: def of bend-kit-bytes@0.3.3.0 Import: import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes Lines 411-424 of bend-kit-bytes@0.3.3.0/bytes.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&start_line=411&end_line=424 import Base # Does needle match at j? ok is the previous byte's result; the first mismatch stops the walk. def at.go(needle: String, ok: Bool, r: Array & U32, +j: U32) -> Array & Bool: match needle: case SNil{}: (a, v) = r (a, ok) case SCon{Chr{+c}, t}: match ok: case False{}: (a, v) = r (a, False{}) case True{}: (a, +v) = r at.go(t, U32.is_eq(v, c), peek(a, (j + 1 : U32)), (j + 1 : U32)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char 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=String 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=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=peek