|
|
|
|
|
by pka
3293 days ago
|
|
It's indeed very interesting! What I meant is that it might be simpler to just have pure functions operating on immutable data structures, which you could then compose in whichever you want. I.e. you could have a function collapse-vertices that takes some geometry and produces some new geometry (without altering the initial one!), which you could then compose with some other pure function, like produce-random-vertices, and so on, much like a Unix pipe. A free monad is just a formalization of the command/interpreter pattern in a purely functional context (i.e. most useful in languages like Haskell or Clojure). |
|
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.