def leave_outcome

bendvy-ecs-core@0.1.0.4 · system.bend:54

import bendvy-ecs-core@0.1.0.4/system.bend as System
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W

54# Leave the captured scope on either executed outcome; never rewind time.
55def leave_outcome(~S:Data,~C:Type,~R:Type,~E:Data,~Args:Type,~Error:Data,~Output:Type,~runner:W.World<S,C,R,E> -> Args -> Outcome<W.World<S,C,R,E>,Error,Output>,outcome:Outcome<W.World<S,C,R,E>,Error,Output>) -> Outcome<W.World<S,C,R,E>,Error,Output>:
56  match outcome:
57    case Succeeded{world,output}:Succeeded{W.leave_run(~S,~C,~R,~E,world),output}
58    case Failed{world,error}:Failed{W.leave_run(~S,~C,~R,~E,world),error}

Uses (3)

Used by (2)