Learn R Programming

lenses (version 0.0.3)

body_l: Body lens

Description

A lens into the body of a function. The lens equivalent of body and body<-. You probably shouldn't use this.

Usage

body_l

Arguments

Format

An object of class lens of length 2.

Examples

Run this code
# NOT RUN {
inc2 <- function(x) x + 2
view(inc2, body_l)
inc4 <- set(inc2, body_l, quote(x + 4))
inc4(10)
# }

Run the code above in your browser using DataLab