Act.on_fail2: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/act.bend as Act Lines 51-56 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=51&end_line=56 import Base import cswap-bend-cli@0.1.0.0/fs.bend as Fs def on_fail2(-A: Type, r: Fs.Res(A), cleanup: of(Unit)) -> of(A): match r: case Done{x}: IO.pure(Fs.Res(A), Done{x}) case Fail{e}: IO.bind(Fs.Res(Unit), Fs.Res(A), cleanup, c => IO.pure(Fs.Res(A), Fail{e})) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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/fs.bend&name=Res