MachineConditions.evaluate: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/machine_conditions.bend as MachineConditions Lines 30-36 of bendvy-ecs-core@0.1.0.4/machine_conditions.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/machine_conditions.bend&start_line=30&end_line=36 import Base def evaluate(~Atom: Data,~Env: Data,~leaf: Atom -> Env -> Bool,tree: Tree,+env: Env) -> Bool: match tree: case Leaf{atom}: leaf(atom,env) case Constant{value}: value case Negate{inner}: Bool.not(evaluate(~Atom,~Env,~leaf,inner,env)) case Both{left,right}: both_next(~Env,evaluate(~Atom,~Env,~leaf,left,env),env,env => evaluate(~Atom,~Env,~leaf,right,env)) case Either{left,right}: either_next(~Env,evaluate(~Atom,~Env,~leaf,left,env),env,env => evaluate(~Atom,~Env,~leaf,right,env)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine_conditions.bend&name=Tree https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine_conditions.bend&name=both_next https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine_conditions.bend&name=either_next