The last "m" in your innermost (if ...) is unnecessary: As with the difference between "for" and "map" in plain Scheme, the return value of the lambda function in for-some-music gets discarded ("for" functions are supposed to _do_ something, not _return_ something).No, it doesn't. It is a boolean that determines whether to recurse (#f) or not (everything else).
Of course you're right, my bad. To be more precise: - Plain Scheme (for ...) is indeed not supposed to return something but rather do something. - LilyPond's (for-some-music ...) is intended to i) do something, ii) return a boolean indicating whether the recursion should continue (kind of "is my work done in this branch of music?"). Of course that's what you explained, I just wanted to point out the comparison with standard "for". So @Kieren: In your example you should take care to control the return value of your lambda (in particular, also in the else-branches of your if's.) Lukas
