insert_return: Insert Optional Return Expressions

View source: R/insert_return.R

insert_returnR Documentation

Insert Optional Return Expressions

Description

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

Usage

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 May 14, 2024, 7:40 p.m.