tailcall_eliminate: Eliminates tailcalls under special circumstances

Description Usage Arguments Value

View source: R/tailcall_eliminate.R

Description

tailcall_eliminate takes a function. If that functions has a Recall call as the last operation, it will attempt to replace the recursion by a GOTO statement in the byte-code representation. Beware, this can have unintended problems, if the calls have side-effects.

Usage

1

Arguments

fun

a function

Value

the same function, but with more efficient byte-code. If the function was optimized.


dirkschumacher/notail documentation built on Dec. 20, 2021, 12:03 a.m.