I'm not sure about how you would efficiently do this. (I'm not experienced with pure functional programming.) cloning the entire structure for every applied function sounds like it will be slow? is that not what you will have to do in practice?
i basically want the alterations to change the data structure, and i want them to do it according to a particular priority eventually. atm there is no priority ordering.
i can already make (almost) arbitrary functions, but you have to register them ahead of time, and they have to follow a particular pattern: http://inconvergent.net/arbitrary-alterations/. this is so that i can control the order in which they are applied, eventually.