Hello Lukas,
Many thanks for the clarification. My apologies for the belated reply since my week got quite busy. I understand your explanation: You can also use the question mark in the variable name, which confused me for a moment.
I think I was mixing information I read previously about predicates in LilyPond, and thought myself restricted to the list here:
I could also modify your to use a boolean explicitly:
scoreIf = #(define-void-function (some-condition score) (boolean? ly:score?)
(if some-condition (add-score score)))
But I'm really no Scheme expert. Still hacking my way through.
Many thanks,
mattfong