2016-11-07 1:20 GMT+01:00 Andrew Bernard <andrew.bern...@gmail.com>:
> Hi Simon,
>
> Thanks! Exactly perfect. Sometimes the completely obvious escapes me. Better
> have another coffee.
>
> Most appreciated.
>
> I suppose of course that to make it a predicate without the preliminary let
> block (not that I have any objection to that) one would have to modify
> lilypond internals, which would not be desirable.
>
> Andrew



Hi Andrew,

do you want to have the _symbols_ 'left, 'right checked with "side?"?
Then Simons proposal could be changed to use "eq?"

Or do you want to check for the predefined left, right, center, LEFT,
RIGHT and CENTER? (Similiar for up, down)

Note:
(display left)
-> -1

Then something like
#(define side? (lambda (x) (->bool (member x (iota 3 -1 1)))))
may work:
(display (side? left))
->
#t


Use it as a toplevel-definition. No need to change any internals.
(Same for Simons suggestion)

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to