Cli.roff_examples: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 7521-7532 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=7521&end_line=7532 import Base def roff_examples(items: List<&2, Item>, before: List<&2, String>) -> List<&2, String>: match items: case Nil{}: Nil{} case Example{line, what} <> tail: List.concat(&2, String, [ before, [Roff.esc(String.append(what, ":")), ".IP", ".nf", Roff.esc(String.append("$ ", line)), ".fi"], roff_examples(tail, [".PP"]), ]) case head <> tail: roff_examples(tail, before) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.concat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Item https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Roff.esc