Frame.blank.find: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/frame.bend as Frame Lines 25-33 of cswap-bend-cli@0.1.0.0/frame.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/frame.bend&start_line=25&end_line=33 import Base # Index of the LF that ends a blank line: an LF whose previous line break was # an LF too (CR before either is ignored). `prev`: the last significant # character was an LF (true at the start, so leading blank lines are cut). def blank.find(s: String, +n: Nat, +prev: Bool) -> Maybe<&2, Nat>: match s: case SNil{}: None{} case SCon{Chr{+c}, t}: nl.pick(prev && U32.is_eq(c, 10), n, blank.find(t, Nat.add(n, 1n), Bool.pick(Bool, U32.is_eq(c, 13), prev, U32.is_eq(c, 10)))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/frame.bend&name=nl.pick