def matches

bendvy-ecs-core@0.1.0.4 · ordinary_machine_declaration.bend:64

import bendvy-ecs-core@0.1.0.4/ordinary_machine_declaration.bend as OrdinaryMachineDeclaration
import Base
import bendvy-ecs-core@0.1.0.4/machine.bend as M
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap

64# Compare an observed current state with a Data value using the supplied
65# closed equality function. Returns owner and Bool; missing state is false.
66# Does not inspect queued targets, consume a cursor or schedule a transition.
67def matches(~H:Type,~S:Data,~Token:Data,~V:Data,~same:V -> V -> Bool,~cap:Cap.ValueRead<H,M.CurrentView<S,Token,V>>,owner:H,value:V) -> H & Bool:
68  compared(~H,~S,~Token,~V,~same,value,get(~H,~S,~Token,~V,~cap,owner))

Uses (6)

Used by (0)

No other definition uses this definition.