Transform a stageRunnerNode according to a functional.
stageRunnerNode_transform(transformation)
transformation | function. An arity-1 function which takes the
|
---|
The transformed callable.
not_run({ increment <- 1 adder <- function(x) x + increment node <- stageRunnerNode$new(function(e) print(adder(1))) node$transform(function(fn) { environment(fn)$increment <- environment(fn)$increment + 1; fn }) node$run() # Prints 3, rather than 2 })