- (cond
- ((null? mods) chord)
- ((ly:pitch? (car mods))
- (if (= (pitch-step (car mods)) 11)
- (set! explicit-11 #t))
- (interpret-additions
- (cons (car mods) (remove-step (pitch-step (car mods)) chord))
- (cdr mods)))
- ((procedure? (car mods))
- (interpret-additions
- ((car mods) chord)
- (cdr mods)))
- (else (interpret-removals chord mods))
- ))
+ (define (interpret-additions chord mods)
+ "Interpret additions. TODO: should restrict modifier use?"
+ (cond ((null? mods) chord)
+ ((ly:pitch? (car mods))
+ (if (= (pitch-step (car mods)) 11)
+ (set! explicit-11 #t))
+ (interpret-additions (cons (car mods) (remove-step (pitch-step (car mods)) chord))
+ (cdr mods)))
+ ((procedure? (car mods))
+ (interpret-additions ((car mods) chord)
+ (cdr mods)))
+ (else (interpret-removals chord mods))))