rcurry

Returns a function that applies function to curried-args plus its own arguments, with the curried-args occurring last.

rcurry (“right” curry) operates just like curry, except it allows the rightmost arguments of function to be specified in advance, rather than the leftmost arguments.  For example, rcurry(\>, 6) is a predicate that returns true for values greater than 6.

define constant number? = rcurry(instance?, <number>)
number?(4)
⇒ #t
number?("string")
⇒ #f
define constant greater-than-10? = rcurry(\>, 10)
greater-than-10?(4)
⇒ #f

Exported from

Arguments

functionAn instance of <function>.
#rest curried-argsInstances of <object>.

Values

new-functionAn instance of <function>.
Returns a function that applies function to curried-args plus its own arguments, with the curried-args occurring last.
Returns a function that applies function to curried-args plus its own arguments, in that order.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of objects that can be applied to arguments.
The class of all Dylan objects.