Open kindlychung opened 7 years ago
I can't speak for @renkun-ken, but changing this would change expected R
behavior. You could either wrap in a function for scoping or use local
.
1:10 %>>% {local({x=10;print(.)})}
x
This is even uglier but does work.
1:10 %>>% (function(.){x=10;print(.)})()
x
It would be desirable not have intermediate variables leak into the global environment.
Thanks for the nice work!