def replace_next
import bendvy-ecs-core@0.1.0.4/ordinary_app_schedules.bend as OrdinaryAppSchedulesimport Base
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP
49def replace_next(~S:Data,same:Bool,label:String,plan:SP.Plan<S>,old:Named<S>,rest:List<&2,Named<S>>,next:List<&2,Named<S>>) -> List<&2,Named<S>>:
50 match same:
51 case True{}:Named{label,plan} <> rest
52 case False{}:old <> next