IndexedLifecycle.write_grow: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/indexed_lifecycle.bend as IndexedLifecycle Lines 30-37 of bendvy-ecs-core@0.1.0.3/indexed_lifecycle.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/indexed_lifecycle.bend&start_line=30&end_line=37 import Base import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick import lifecycle.bend as L # Factory-produced metadata starts at1 and normal targets require at most17 grows. def write_grow(fuel:Nat,+id:U32,stamp:L.Stamp,added:Array>,changed:Array>,+capacity:U32,+depth:Nat,exceptional:List<&2,L.Entry>,fits:Bool) -> Metadata: match fuel fits: case _ True{}: write_ready(id,added,changed,capacity,depth,exceptional,stamp) case 0n False{}: Metadata{added,changed,capacity,depth,exceptional} case 1n+rest False{}: +next = U32.shl(capacity) write_grow(rest,id,stamp,ANode{added,Array.new(Maybe<&2,Tick.Tick>,depth,None{})},ANode{changed,Array.new(Maybe<&2,Tick.Tick>,depth,None{})},next,1n+depth,exceptional,U32.is_le(id,next)) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.new https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shl https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/change_tick.bend&name=Tick https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/indexed_lifecycle.bend&name=Metadata https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/indexed_lifecycle.bend&name=write_ready https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/lifecycle.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/lifecycle.bend&name=Stamp