asNormalFunc: Convert a cacheable function to a normal function

Description Usage Arguments Value Examples

Description

Functions built with reactFunc can be converted to a normal version so that you do not need to replicate yourself.

Usage

1

Arguments

f

A function built with reactFunc.

Value

Return a function having similar behavior with the input function.

Examples

1
2
3
4
5
6
7
8
9
refunc <- reactFunc(ARGV = alist(x = , y = ),
    ans = a() * b(),
    a = x + 1,
    b = y - 3,
    ret = ans()
)
normfunc <- asNormalFunc(refunc)
normfunc
identical(refunc(6,9), normfunc(6,9))

Marlin-Na/reactFunc documentation built on May 7, 2019, 3:36 p.m.