OrdinaryOptionalResource.slot_available: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/ordinary_optional_resource.bend as OrdinaryOptionalResource Lines 31-35 of bendvy-ecs-core@0.1.0.4/ordinary_optional_resource.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_optional_resource.bend&start_line=31&end_line=35 import Base import bendvy-ecs-core@0.1.0.4/ordinary_schema.bend as Schema import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product # Preflight examines only the slot; it must not invoke the value presenter. def slot_available(~S:Data,~R:Type,~P:Type,~Rest:Type,~identity:Schema.Resource,~lens:Product.Lens,Rest>,result:Rest & Slot) -> R & List<&2,String>: match result: case (rest,Missing{}):(Product.put_field(~R,~Slot,~Rest,lens)(rest,Missing{}),[Schema.resource_key(~S,~P,identity)]) case (rest,Present{owner}):(Product.put_field(~R,~Slot,~Rest,lens)(rest,Present{owner}),[]) Uses (9): 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=String https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_optional_resource.bend&name=Slot https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_schema.bend&name=Resource https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_schema.bend&name=resource_key https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/owner_product.bend&name=Lens https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/owner_product.bend&name=put_field