Am 26.04.20 um 10:30 schrieb Thomas Morley:
However, when I swap integer? for positive? (to reflect the fact that only a
positive integer should be acceptable) it breaks, telling me the argument at
position 1 is of the wrong type (it’s music, not a positive number). Why
doesn’t scheme’s handling of optional arguments work when using the positive?
predicate?
I've no clue why positive? fails here.
Though, for integers >= 0 we have the index? predicate, which works in
your function.
Well, positive? does not seem to like being called with anything else
than a number:
(positive? "I'm a string")
fails as well.
I'm not sure as to why that is the case; but anyway, this shows that the
problem does not come from LilyPond.
Best
Lukas