def step_edges
near-v-framework@0.4.0.0 · domain/architecture/view/ops.bend:219
import near-v-framework@0.4.0.0/domain/architecture/view/ops.bend as Ops
import Base
import near-v-framework@0.4.0.0/general/compound/edge/type.bend as E
import near-v-framework@0.4.0.0/domain/architecture/view/type.bend as Vw
219
220def step_edges(ss: List<&2, Vw.Step>, +n: Nat) -> List<&2, E.Edge>:
221 match ss:
222 case []:
223 []
224 case s <> rest:
225 match s:
226 case Vw.Step{x, y, d, t}:
227 E.Edge{x, y, Nat.show(n) ++ ". " ++ d, t} <> step_edges(rest, Nat.add(n, 1n))