[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accidental-restructuring (major)

From: Rune Zedeler
Subject: Re: Accidental-restructuring (major)
Date: Tue, 18 Sep 2007 11:25:55 +0200
User-agent: Thunderbird (X11/20070824)

Han-Wen Nienhuys skrev:

I have another request though. If you are going to rewrite the thing,
can you think of a representation which is less fragile than the
arcane nesting of lists?

I am not sure what you mean with 'nested lists'.
The current implementation uses lists of symbols and pairs:

'(Voice (same-octave . 0) (any-octave . 0) (same-octave . 1) Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))

My suggestion for the new system is to replace the pairs with functions:

`(Voice ,(lambda ...) ,(lambda ...) ,(lambda ...) Staff ,(lambda ...) ,(lambda ...) ,(lambda ...))

I think that the one-level lists are okay, because the algorithm literally traverses the list from left to right, doing all the stuff in the list in sequence.

Perhaps you can capture some part of the
rules in either smobs or Scheme records.

I have never heard of scheme records, and R5RS does not mention them.
What do you mean?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]