How do I make an argument in a scheme function optional?
This says
A Scheme type predicate for which argN must return #t. There is also a special form (predicate? default) for specifying optional arguments.
Unfortunately, this does not tell me what I need to write - at least not in a way I understand.
Here is my scheme function:
pageSong =
#(define-scheme-function
(title music stanzas)
(string? ly:music? markup?)
#{
\bookpart {
\header {
title = $title
}
\score {
$music
\layout {}
}
$stanzas
}
#})
I want stanzas
to be optional. How do I need to modify my code to achieve that?
I tried replacing markup?
by (predicate? default)
, but that didn't do the trick.