Hi,

Am 21.12.2009 um 22:09 schrieb PM:

> I've mocked it up before using structmaps, but I get stuck when it
> comes to doing all this with immutable structures.  Immutability is no
> problem for a system like Lilypond where the score data is fixed when
> the program runs, but in a system where some of these items may be
> changing as the score is edited, how do you handle that?  Returning a
> new note via assoc implies that a track's contents would also change,
> making it a new track, and so on up the chain. (?)

Besides zippers you might also want to look update-in and assoc-in. They work 
both with maps and vectors.

(update-in score [:this-measure :that-stave :the-other-track] modify-track with 
additional args)
(assoc-in score [:this-measure :that-stave :a-new-track] some-new-track)

Sincerely
Meikel

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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

Reply via email to