In infix and prefix forms.

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

not_null <- `!` %O% is.null not_null(4)
#> [1] TRUE
not_null(NULL)
#> [1] FALSE
add1 <- function(x) x + 1 Compose(add1,add1)(8)
#> [1] 10