def phase_for

bendvy-ecs-core@0.1.0.4 · ordinary_app_relation_schedule.bend:34

import bendvy-ecs-core@0.1.0.4/ordinary_app_relation_schedule.bend as OrdinaryAppRelationSchedule
import Base
import bendvy-ecs-core@0.1.0.4/schedule.bend as Sch

34def phase_for(steps:List<&2,Sch.Step>,+id:U32,+current:String) -> String:
35  match steps:
36    case []:""
37    case Sch.Phase{name} <> rest:phase_for(rest,id,name)
38    case Sch.Barrier{} <> rest:phase_for(rest,id,current)
39    case Sch.System{candidate,_} <> rest:
40      selected_phase(U32.is_eq(candidate,id),current,unused=>phase_for(rest,id,current))

Uses (6)

Used by (1)