Raxol. Workflow. Runtime. BranchMerge
(Raxol v2.6.0)
View Source
Merges the terminal states of fan-out branches at a join.
A join carrying an explicit :reduce reducer delegates the whole
list of branch states to that function. Otherwise the branch states
fold left-to-right in branch-index order: a key declared on a
Raxol.Workflow.Channel is combined via the channel's :with
reducer, and any other key is last-write-wins by branch order.
Pure: given the same branch states, join, and channels it always returns the same merged state and touches nothing outside its arguments.
Summary
Functions
Merge branch_states (in branch-index order) into a single state
according to the join's reducer or the graph's declared channels.
Functions
@spec merge([map()], Raxol.Workflow.Edge.JoinEdge.t(), %{ optional(term()) => Raxol.Workflow.Channel.t() }) :: map()
Merge branch_states (in branch-index order) into a single state
according to the join's reducer or the graph's declared channels.