def of_code

cswap-bend-cli@0.1.0.0 · fmt/out.bend:19

import cswap-bend-cli@0.1.0.0/fmt/out.bend as Out
import Base

19# The format a code (code.bend) stands for.
20def of_code(+n: U32) -> Fmt:
21  Bool.pick(Fmt, U32.is_eq(n, 1), FJson{},
22  Bool.pick(Fmt, U32.is_eq(n, 2), FCsv{},
23  Bool.pick(Fmt, U32.is_eq(n, 3), FYaml{},
24  Bool.pick(Fmt, U32.is_eq(n, 4), FToon{}, FText{}))))

Uses (4)

Used by (2)