reduce a container with a function
expression of type appliable; typically, a procedure or name
The reduce function applies the reduction operation specified by fcn to the operands or elements of expr.
Some options can be specified in square brackets as an index to the reduce function. These options can be used by themselves or in combination with other options.
When reducing over an rtable (Array, Vector, or Matrix), if the evalhf option is passed, each evaluation of fcn is evaluated using evalhf.
If the scan option is passed, the reduction is performed cumulatively on the elements of expr, producing a result with the same dimensions as expr.
When expr is an rtable, the inplace option can be used in conjunction with the scan option to compute the result in-place in expr.
The dimension option (alternately axis) restricts the reduction along one dimension of an rtable, producing a result with one less dimension than expr.
The inplace and evalhf options are currently ignored if the dimension option is used.
The reduce function is thread safe, provided that evaluating fcn is thread safe.
For more information on thread safety, see index/threadsafe.
The reduce command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document