Compose: Compose multiple functions.

Description Usage Arguments Value See Also Examples

View source: R/Compose.R

Description

In infix and prefix forms.

Usage

1
2
3
Compose(...)

.f %O% .g

Arguments

...

n functions to apply in order from right to left.

.f

A function.

.g

A function.

Value

A function that will apply each function in order from right to left.

See Also

Other function operators: Fail_With; Memoise; Partial; Reduce_Right

Examples

1
2
3
4
5
6
not_null <- `!` %O% is.null
not_null(4)
not_null(NULL)

add1 <- function(x) x + 1
Compose(add1,add1)(8)

paulhendricks/functools documentation built on May 24, 2019, 8:41 p.m.