def selected

bendvy-ecs-core@0.1.0.4 · ordinary_condition_declaration.bend:47

import bendvy-ecs-core@0.1.0.4/ordinary_condition_declaration.bend as OrdinaryConditionDeclaration
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W

47def selected(~S:Data,~C:Type,~R:Type,~E:Data,chosen:Bool,left:W.World<S,C,R,E> -> U32 -> W.World<S,C,R,E> & Bool,right:W.World<S,C,R,E> -> U32 -> W.World<S,C,R,E> & Bool,world:W.World<S,C,R,E>,slot:U32,offset:Nat) -> W.World<S,C,R,E> & Bool:
48  match chosen:
49    case True{}:left(world,slot)
50    case False{}:right(world,(slot - U32.from_nat(offset) : U32))

Uses (7)

Used by (1)