updateFoldRight: Helper for creating function argument to rightward list...

Description Usage Arguments See Also

Description

Working directly with base::Reduce can be a little tricky, so this function aims to simplify using it. It's intended to be partially applied with something like: pryr::partial(updateFoldRight, f=identity) and then passed as the function argument to foldRightList.

Usage

1
updateFoldRight(result, newArg, f)

Arguments

result

The growing collection of a Reduce operation in which the "reduction" is actually list formation.

newArg

The new argument being processed.

f

The function to apply to the new argument to generate a new element for result.

See Also

foldRightList for the intended destination of a partially-applied version of this, Reduce for what's wrapped.


vreuter/SwissR documentation built on May 14, 2019, 11:29 a.m.