BundleBatch.receipt_find: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/bundle_batch.bend as BundleBatch Lines 45-51 of bendvy-ecs-core@0.1.0.4/bundle_batch.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/bundle_batch.bend&start_line=45&end_line=51 import Base import entity_key.bend as K import world.bend as W def receipt_find(~S:Data,~P:Type,prepared:List>,+target:W.Handle) -> List> & Bool: match prepared: case []: ([],False{}) case Prepared{handle,payload,position} <> tail: receipt_join(~S,~P,Prepared{handle,payload,position},False{},receipt_find(~S,~P,tail,target)) case ReservationReceipt{W.Handle{+ns,+id}} <> tail: match target: case W.Handle{+otherNs,+otherId}: receipt_join(~S,~P,ReservationReceipt{W.Handle{ns,id}},Bool.and(U32.is_eq(ns,otherNs),K.equal(id,otherId)),receipt_find(~S,~P,tail,W.Handle{otherNs,otherId})) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/bundle_batch.bend&name=Prepared https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/bundle_batch.bend&name=receipt_join https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/entity_key.bend&name=equal https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=Handle