Dan Eble <[email protected]> writes: > This not do what I intended: > > ``` > (case (ly:item-break-dir grob) > ((LEFT) (ly:grob-property grob 'glyph-left)) > ((RIGHT) (ly:grob-property grob 'glyph-right)) > (else (ly:grob-property grob 'glyph)))) > ``` > > This does: > > ``` > (case (ly:item-break-dir grob) > ((-1) (ly:grob-property grob 'glyph-left)) > ((1) (ly:grob-property grob 'glyph-right)) > (else (ly:grob-property grob 'glyph)))) > ``` > > Why?
Because case does not evaluate the tag lists, so you are comparing with the symbol LEFT rather than the value -1 in the first case. Also it uses eqv? so it doesn't work for strings, not even literal ones. It's a syntax construct that is less useful than it looks at first sight. -- David Kastrup
