Scan.when: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/scan.bend as Scan Lines 124-130 of yaml-for-bend@0.1.1.0/scan.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/scan.bend&start_line=124&end_line=130 import Base # +yes+ when +hit+, else +no+; only the one chosen runs. def when(-A: Type, hit: Bool, yes: Unit -> A, no: Unit -> A) -> A: match hit: case True{}: yes(Unit{}) case False{}: no(Unit{}) Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit