GregorDeCillia/kasper

Make it possible to reuse the last env from `$eval`

GregorDeCillia opened this issue · 1 comments

This feature should introduce a new parameter reset_env to myEvaluator$eval() which decides wether the environment from the last call to eval should be reused. Example

myEvaluator <- evaluator$new()
myEvaluator$eval(x <- 1)
myEvaluator$eval(x, reuse_env = TRUE)
myEvaluator$replay()
## > x
## [1] 1

Currently, this would lead to an error since every call to eval creates a seperate environment.

Implemented in 680c400