def node_steps

near-v-framework@0.4.0.0 · domain/architecture/system/effects.bend:389

import near-v-framework@0.4.0.0/domain/architecture/system/effects.bend as Effects
import Base
import near-v-framework@0.4.0.0/domain/architecture/type.bend as A
import near-v-framework@0.4.0.0/domain/architecture/system/deployment/type.bend as D
import near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend as P

389def node_steps(ns: List<&2, D.Node>, +root: String, +a: A.Architecture) -> IO(List<&2, P.Step>):
390  match ns:
391    case []:
392      IO.pure(List<&2, P.Step>, [])
393    case n <> rest:
394      match n:
395        case D.Node{+k, _, _, _, _, pf, kids, _}:
396          do IO<List<&2, P.Step>>:
397            here : List<&2, P.Step> <- platform_steps(pf, root, k, a)
398            below : List<&2, P.Step> <- node_steps(kids, root, a)
399            after : List<&2, P.Step> <- node_steps(rest, root, a)
400            return List.append(&2, P.Step, here, List.append(&2, P.Step, below, after))

Uses (10)

Used by (1)