Cli.osa.row: def of shake@0.7.0.0 Import: import shake@0.7.0.0/src/cli.bend as Cli Lines 2288-2306 of shake@0.7.0.0/src/cli.bend: https://jend.leeeet.dev/read.txt?path=shake@0.7.0.0/src/cli.bend&start_line=2288&end_line=2306 import Base # the rest of a row for the char `ca`, whose char before is `pa`: `ps` is the # row above from the cell above-left on, `qs` the row two up from two cells # left on, `pb` the char of `bs` before its head def osa.row( bs: List<&2, Char>, +ca: Char, +pa: Maybe<&2, Char>, pb: Maybe<&2, Char>, left: Nat, +ps: List<&2, Nat>, +qs: List<&2, Nat> ) -> List<&2, Nat>: match bs: case Nil{}: [] case Con{+cb, bt}: +rr = osa.cell(osa.swap(pa, pb, ca, cb), osa.head(osa.tail(ps)), left, osa.head(ps), Bool.pick(Nat, Char.is_eq(ca, cb), 0n, 1n), osa.head(qs)) rr <> osa.row(bt, ca, pa, Some{cb}, rr, osa.tail(ps), osa.tail(qs)) Uses (10): 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=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=shake@0.7.0.0/src/cli.bend&name=osa.cell https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/cli.bend&name=osa.head https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/cli.bend&name=osa.swap https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/cli.bend&name=osa.tail