def section_blocks
cli@0.2.0.0 · cli.bend:5580
import cli@0.2.0.0/cli.bend as Cli
import Base
5580def section_blocks(sections: List<&2, Section>, +shorted: Bool, +w: Nat,
5581 +k: Nat, +c: Nat) -> List<&2, List<&2, Segment>>:
5582 match sections:
5583 case Nil{}: Nil{}
5584 case Section{title, Nil{}} <> tail: section_blocks(tail, shorted, w, k, c)
5585 case Section{title, rows} <> tail:
5586 (Segment{String.append(title, ":"), [Bold{}, Under{}]} <>
5587 rows_lines(rows, shorted, w, k, c)) <>
5588 section_blocks(tail, shorted, w, k, c)