Hi Matthew,
Am 03.12.20 um 01:50 schrieb Matthew Fong:
... and I will have use of question? Didn't know about that!
In fact, that's just an arbitrary name for a variable! (And, to be
honest, I wasn't completely happy with my choice.)
So, the following would work just the same:
scoreIf = #(define-void-function (some-condition score) (scheme? ly:score?)
(if some-condition (add-score score)))
I would have liked to use "condition" or "cond", but these are reserved
words in Guile, if I'm not mistaken. Maybe "print-it" would be a nice
name: "if print-it (add-score score)" seems to be quite self-explanatory.
As for the ? in "question?": By convention, names ending in "?" are used
for "predicates", that is, functions returning only #t or #f as values.
I seem to remember that some people extend this convention and use the ?
also for variables that should contain boolean values (#t/#f), and
that's what I did here.
Lukas