[Haskell-cafe] music-related problem

Michael Mossey mpm at alumni.caltech.edu
Sun Jul 4 15:23:02 EDT 2010

Serguey Zefirov wrote:
>> The thing that is hard for me to understand is how, in a functional
>> paradigm, to update the entire Doc by chasing down every tie and making
>> all necessary updates.
> This looks like one of graph algorithms.
> Notes are nodes, ties are arcs. Measures, etc are parts of node label.
> soundedEnd property can be computed over this.
> Actually, it would be wise to parametrize Item with computed
> attributes so that you can clearly distinguish between documents where
> soundedEnd is set from documents where it is not.

Ah, this sounds like something I am looking for... parameterizing Item with 
the computed attributes. But I am not clear about what that would look 
like. Would Item have kind * -> *? Like

data Item c = Item {pitch::Pitch, end::Loc, computed::c}



More information about the Haskell-Cafe mailing list