def bold_names

cli@0.2.0.0 · cli.bend:5343

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

5343def bold_names(names: List<&2, String>, first: Bool) -> List<&2, Segment>:
5344  match names:
5345    case Nil{}: Nil{}
5346    case name <> tail:
5347      List.append(&2, Segment,
5348        Bool.pick(List<&2, Segment>, first, [], [plain(", ")]),
5349        Segment{String.trim_start(name), [Bold{}]} <> bold_names(tail, False{}))

Uses (9)

Used by (2)