def sections_blocks

cli@0.2.0.0 · cli.bend:5590

import cli@0.2.0.0/cli.bend as Cli
import Base

5590# One column for the page: C = L + 4, with K = 2W/5.
5591def sections_blocks(+sections: List<&2, Section>, +w: Nat) ->
5592    List<&2, List<&2, Segment>>:
5593  +rows = section_rows(sections)
5594  +shorted = any_short(rows)
5595  +k = Nat.div((2n * w : Nat), 5n)
5596  section_blocks(sections, shorted, w, k,
5597    (widest(rows, shorted, k, 0n) + 4n : Nat))

Uses (11)

Used by (1)