RestoreData.lookup: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/restore_data.bend as RestoreData Lines 38-42 of bendvy-ecs-core@0.1.0.3/restore_data.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/restore_data.bend&start_line=38&end_line=42 import Base import bendvy-ecs-core@0.1.0.3/entity_key.bend as Key import bendvy-ecs-core@0.1.0.3/world.bend as W def lookup(~S:Data,+saved:Key.Key,bindings:List<&2,Binding>) -> Maybe<&2,W.Handle>: match bindings: case []:None{} case Binding{+key,+target} <> rest: lookup_choose(~S,Key.equal(saved,key),target,_ => lookup(~S,saved,rest)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/entity_key.bend&name=Key https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/entity_key.bend&name=equal https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/restore_data.bend&name=Binding https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/restore_data.bend&name=lookup_choose https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/world.bend&name=Handle