def entities

bendvy-ecs-core@0.1.0.4 · restore_raw.bend:65

import bendvy-ecs-core@0.1.0.4/restore_raw.bend as RestoreRaw
import Base
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/snapshot_data.bend as Snapshot

65def entities(values:List<&2,D.Raw>,+index:U32) -> Decoded<List<&2,Snapshot.Entity>>:
66  match values:
67    case []:Value{[]}
68    case raw <> rest:entities_head((_ => entities(rest,U32.add(index,1))),entity("$.entities[" ++ U32.show(index) ++ "]",raw))

Uses (10)

Used by (2)