Hi, After having used Clojure for a few months now, I'm still having lots of trouble separating my mutable code from my immutable code. My use- case is pretty typical I think, so I'm wondering what sort of structure everyone else is using.
Here's my current structure. I have an engine that manages a list of sprites. The engine runs in a loop and updates all the sprites incrementally sixty times a second. When an event occurs, the engine notifies each sprite. When a sprite receives an event, it processes it, and then notifies each of it's listeners. Typical Java event listener model. Well.... this scheme has mutability written all over it. I'm currently representing sprites as references of immutable maps. So my code is literally littered with (dosync) instructions. How would I go about separating my mutable code from my immutable code? I think I need a completely different angle to attack the problem? Thanks a lot for the help -Patrick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---