curry: Curries a function

Description Usage Arguments Value Examples

Description

Curries a function. See http://en.wikipedia.org/wiki/Currying for more information.

Usage

1
curry(func, ...)

Arguments

func

The function to curry.

...

The parameters to use (named parameters can be used).

Value

The curried function.

Examples

1
2
curry(function(x, y) { x + y }, x = 1)(2) # = 3
curry(log, base = 2)(16) # = 4

betabandido/exptools documentation built on May 12, 2019, 7:25 p.m.