`transform()` for in-place mapping
LeaVerou opened this issue · comments
We discussed this somewhere but never created an issue.
Transforming an AST in place can also be useful. I propose a transform()
function for that.
map()
could then be defined in terms of transform()
, by using a callback that always returns a new object.
Note that transforming in place poses a few challenges to avoid infinite loops.
I wrote a transform
function, and I'm still working on rewriting map
to call transform; figuring out the copying is proving to be more difficult than I expected