def remove

bendvy-ecs-core@0.1.0.4 · ordinary_app_schedules.bend:73

import bendvy-ecs-core@0.1.0.4/ordinary_app_schedules.bend as OrdinaryAppSchedules
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP

73# Remove the named Data plan and return App plus its previous plan if present.
74# Registered owners remain alive and shared; removal does not dispose a system.
75def remove(~S:Data,~C:Type,~R:Type,~E:Data,~H:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:H -> H & List<&2,Records.Fields<S>>,value:Application<S,C,R,E,H,Rows,observe,fold>,+label:String) -> Application<S,C,R,E,H,Rows,observe,fold> & Maybe<&2,SP.Plan<S>>:
76  match value:
77    case Application{app,+plans}:(Application{app,without(~S,label,plans)},lookup(~S,label,plans))

Uses (12)

Used by (0)

No other definition uses this definition.