insert_return: Insert Optional Return Expressions

Description Usage Arguments Details

View source: R/insert_return.R

Description

This function transforms a function so that every expression that can be returned is explicitly marked by a return() expression.

Usage

1
insert_return(node, ..., recursive = TRUE)

Arguments

node

(Function) The function to transform.

...

Optional arguments to and from methods.

recursive

(logical) Should functions defined in node also be transformed?

Details

This is an in-place transformation! This function may not behave as expected if called on a non-function.


nick-ulle/ast documentation built on July 17, 2018, 4:16 a.m.