Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/vendrinc/elm-flow-layout is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 1.0.0 found (1 same-name repos checked); no cached copy. Use another version.
Returns all recursive children of the Flow (including the input Flow itself), in a depth-first traversal.
Sequential
[ Node 1
, Parallel
[ Node 2
, Node 3
]
, Condition 4
{ trueSeq = [ Node 5 ]
, falseSeq = [ Node 6 ]
}
]
|> descendants
== [ Sequential [ Node 1, Parallel [ Node 2, Node 3 ], Condition 4 { trueSeq = [ Node 5 ], falseSeq = [ Node 6 ] } ]
, Node 1
, Parallel [ Node 2, Node 3 ]
, Node 2
, Node 3
, Condition 4 { trueSeq = [ Node 5 ], falseSeq = [ Node 6 ] }
, Node 5
, Node 6
]Collect the right-most nodes.
The before and after record fields are meant in the workflow sense:
you need to first complete the before step,
then you can complete the after step.
edges (Seq [ Node 0, Node 1 ])
-->
[ { before = 0, after = 1, branch = 0 } ]Fold by visiting nodes in the same order they would get unblocked.
0 ──╮── 1 ─── 3 ── 6 ──╭─ 3
╰── 2 ─╮─ 4 ──╭────╯
╰─ 5 ──╯Unlike parallel tracks, condition branches are visited entirely before the next one.
ᴛʀᴜᴇ
0 ──╮──╮── 1 ─── 3 ── 6 ──╭──╭─── 10
│ ╰── 2 ─╮─ 4 ─╭─────╯ │
│ ╰─ 5 ─╯ │
│ ғᴀʟsᴇ │
╰──╮── 7 ─── 9 ─╭────────╯
╰── 8 ───────╯OPTIMIZE: apply simplifications until you reach a fixpoint. This uses a library Janiczek/transform that handles that fixpoint boilerplate.
Apply a function to every node, having acces to the Flow value itself.
Note that
Sequential []is our designated "empty" node.Parallel []could fit the same purpose technically but we prefer Sequential. We coerceParallel []intoSequential []when runningoptimize.DESIGN NOTE: Another option would be to have non-empty lists in Sequential and Parallel and have an explicit
Emptyconstructor.