def osa.rows
import shake@0.7.0.0/src/cli.bend as Cliimport Base
2308# the rows for the chars of `as`, the last row `pp` and the one before `qq`,
2309# down to the distance in the last row's last cell
2310def osa.rows(
2311 as: List<&2, Char>,
2312 +bs: List<&2, Char>,
2313 pa: Maybe<&2, Char>,
2314 +ii: Nat,
2315 +pp: List<&2, Nat>,
2316 qq: List<&2, Nat>
2317) -> Nat:
2318 match as:
2319 case Nil{}:
2320 osa.last(pp, 0n)
2321 case Con{+ca, at}:
2322 osa.rows(at, bs, Some{ca}, 1n+ii, (1n+ii) <> osa.row(bs, ca, pa, None{}, 1n+ii, pp, 0n <> qq), pp)