Act.on_fail: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/act.bend as Act Lines 58-60 of cswap-bend-cli@0.1.0.0/act.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/act.bend&start_line=58&end_line=60 import Base import cswap-bend-cli@0.1.0.0/fs.bend as Fs # Run `cleanup` only when `act` failed, and still answer the failure. def on_fail(-A: Type, act: of(A), cleanup: of(Unit)) -> of(A): IO.bind(Fs.Res(A), Fs.Res(A), act, r => on_fail2(A, r, cleanup)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=on_fail2 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&name=Res