View Source Reactor.Step.Map (reactor v0.10.1)
Given an iterable input run the provided steps for each element and collect the results into a new value.
A note on ordering
If your application doesn't need the results back in the same order that they were provided then setting
strict_ordering?
tofalse
will increase performance - especially on large input sets.
Options
:state
- Required. The current execution state of the map. This is required because it's recursive. Valid values are :init, :iterating:batch_size
(pos_integer/0
) - The number of elements to consume off the source when emitting steps. The default value is100
.:steps
(list of struct of typeReactor.Step
) - Required. The steps to use when mapping source elements.:return
(atom/0
) - Required. The name of the step whose result will be used as the new value for each element.:strict_ordering?
(boolean/0
) - Whether the mapped values must be returned in the same order that they were provided. The default value istrue
.:allow_async?
(boolean/0
) - Whether the emitted steps should be allowed to run asynchronously. The default value istrue
.:descendant_step_names
(struct of typeMapSet
) - The cached names of all descendant steps to aid rewriting. You don't need to provide this value - it is calculated by the init pass.:extra_arguments
(list of struct of typeReactor.Argument
) - Extra arguments to be passed by to every nested step.