Explain predicate signature

This commit is contained in:
Nick Treleaven 2023-10-31 17:26:48 +00:00
parent f491d1f233
commit 5762f3311b

View file

@ -4811,6 +4811,12 @@ Implements the homonym function (also known as `accumulate`, $(D
compress), `inject`, or `foldl`) present in various programming
languages of functional flavor, iteratively calling one or more predicates.
$(P Each predicate in `fun` must take two arguments:)
* An accumulator value
* An element of the range `r`
$(P Each predicate must return a value which implicitly converts to the
type of the accumulator.)
$(P For a single predicate,
the call `fold!(fun)(range, seed)` will:)