def abandon_checked

bendvy-ecs-core@0.1.0.3 · entity_allocator.bend:73

import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as EntityAllocator
import Base
import entity_key.bend as K

73def abandon_checked(+key:K.Key,observed:Allocator & Bool) -> Allocator:
74  match observed:
75    case (allocator,False{}):allocator
76    case (Allocator{next,high,slots,capacity,depth,free,order},True{}):Allocator{next,high,Array.set(Slot,slots,K.index(key),phase_slot(key,Consumed{})),capacity,depth,free,without(order,key)}

Uses (11)

Used by (1)