def abandon_pending_checked

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

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

120def abandon_pending_checked(+key:K.Key,next:Allocator -> Allocator & List<&2,K.Key>,observed:Allocator & Bool) -> Allocator & List<&2,K.Key>:
121  match observed:
122    case (allocator,True{}):next(write_phase(allocator,key,Consumed{}))
123    case (allocator,False{}):abandon_pending_kept(key,next(allocator))

Uses (9)

Used by (1)