Skip to content
Prev 389136 / 398506 Next

Evaluating lazily 'f<-' ?

e = expression(r(x) <- 1)

lapply(e, as.list)
[[1]]
[[1]][[1]]
`<-`

[[1]][[2]]
r(x)

[[1]][[3]]
[1] 1
#######################

lapply(e[[1]], as.list)
[[1]]
[[1]][[1]]
`<-`


[[2]]
[[2]][[1]]
r

[[2]][[2]]
x


[[3]]
[[3]][[1]]
[1] 1

However, I would urge you not to go down this rabbit hole unless you
are comfortable with recursion and have good reason to compute on the
language.

Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Mon, Sep 13, 2021 at 11:43 AM Leonard Mada via R-help
<r-help at r-project.org> wrote: