body_l: Body lens

Description Usage Format Examples

Description

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

Usage

1

Format

An object of class lens of length 2.

Examples

1
2
3
4
inc2 <- function(x) x + 2
view(inc2, body_l)
inc4 <- set(inc2, body_l, quote(x + 4))
inc4(10)

cfhammill/focal documentation built on May 23, 2019, 6:04 p.m.