renkun-ken / pipeR

Multi-Paradigm Pipeline Implementation
Other
167 stars 39 forks source link

Support global assignment #65

Closed renkun-ken closed 9 years ago

renkun-ken commented 9 years ago

The functionality of <<- should be preserved in the pipeline expressions for assignment.

For example,

local({i <- 10; 1:10 %>>% (. -> x)})

happens in the local environment so that nothing happens outside.

local({i <- 10; 1:10 %>>% (. ->> x)})

happens in the local environment but ->> should be interpreted as if the operator is called. Therefore the global environment then should contain x = 1:10.