curr: Partially and fully apply arguments to functions.

Description Usage Arguments Details Value Note Author(s)

Description

These operators help in passing arbitrary lists of arguments to functions, with a more convenient interface than do.call. The partial application operator allows saving some arguments with a reference to a function so the resulting function can be passed elsewhere.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
f %()% arglist

f %<<% x

f %<<<% x

## S3 method for class '...'
f %<<<% x

curr(f, ...)

curl(f, ...)

x %__% y

Arguments

f

a function, to be called, or to to have arguments attached to.

arglist

A ... object (see dots.)

x

a vector, optionally with names, or an object of class ... as produced by dots.

...

Other arguments. to be captured without evaluating.

y

a ... object as constructed by dots.

Details

These objects have methods for objects of class ... produced by dots, so that you may partially apply argument lists without arguments as yet unevaluated.

Value

Note

"Curry" is a slight misnomer for partial function application.

Author(s)

Peter Meilstrup


crowding/vadr documentation built on May 14, 2019, 11:33 a.m.