Optional
endCollect all the values used in the step and pass to Step#runWith. Then replace the collected values with those returned by Step#runWith.
This method concludes by starting the next step, if there is one. Not starting the next step can cause the action to end prematurely. This should be noted if overriding this method in a subclass. It is best to override Step#runWith if you just want to implement the step's own behaviour.
Optional
parent: Step
Default execution is to call all function values in parallel and/or yield any generators. The final result from calling the functions will also be yielded if it is not undefined. All other values, along with non-generator function return values are used to build the args for the next function encountered. Will also yield generators returned by fuctions.
Interpretes values and returns replacement values.
An action is simply an array of different values. Steps are some of these values that provide interpretations for the values following them (up until the next termination step or the end of the action).
A simple policy is adopted to resolve situations when a step encounters another while collecting the values it runs with:
If the next step has a
priority
of0
, the current step, along with any others it is nested within, finish immediately.If instead the next step has a priority of
1
, it will be started and any values ityield
s will be collected by the preceding step as part of the values it uses to run.To force a step to stop collecting values, esplicitly terminate with the
$
function value. If the step we want to stop has nested steps which are still collecting values, simply call the$
function with the step.Example