def choose

bendvy-ecs-core@0.1.0.4 · machine_handler_engine.bend:40

import bendvy-ecs-core@0.1.0.4/machine_handler_engine.bend as MachineHandlerEngine
import Base
import bendvy-ecs-core@0.1.0.4/machine.bend as M

40def choose(~S:Data,~K:Data,~V:Data,skip:Bool,+current:V,+value:V,previous:Maybe<&2,V>,+skipSame:Bool) -> Prepared<S,K,V>:
41  match skip:
42    case True{}: Idle{M.Present{current,M.NoPending{},previous,False{}}}
43    case False{}: BendvyReady{M.Present{current,M.NoPending{},Some{current},False{}},M.Transition{current,value},skipSame}

Uses (6)

Used by (2)