Test whether a function is a memoised copy. Memoised copies of functions carry an attribute memoised = TRUE, which is what is.memoised() tests for.

is.memoised(f)

Arguments

f

Function to test.

See also

Examples

mem_lm <- memoise(lm) is.memoised(lm) # FALSE
#> [1] FALSE
is.memoised(mem_lm) # TRUE
#> [1] TRUE