def saved_entities
bendvy-ecs-core@0.1.0.4 · restore_raw.bend:108
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
108def saved_entities(values:List<&2,Snapshot.Entity>) -> List<&2,D.Raw>:
109 match values:
110 case []:[]
111 case Snapshot.Entity{key,components} <> rest:D.Object{[D.Field{"id",saved_key(key)},D.Field{"components",D.Object{components}}]} <> saved_entities(rest)