Setimp.pick_format: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/setimp.bend as Setimp Lines 68-74 of cswap-bend-cli@0.1.0.0/setimp.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/setimp.bend&start_line=68&end_line=74 import Base # `--format NAME` when given, else the file's extension. def pick_format(explicit: Maybe<&2, String>, +path: String) -> Result<&2, &2, String, String>: match explicit: case Some{+n}: fmt.named(known_name(n), n) case None{}: fmt.ext(known_name(ext_of(path)), path) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setimp.bend&name=ext_of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setimp.bend&name=fmt.ext https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setimp.bend&name=fmt.named https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setimp.bend&name=known_name