Again: Thank you, David!
So now (with upcoming 2.15.31 or 2.16) one can write functions like:
--snip--
bookif = #(define-scheme-function (parser location book pred)(ly:book?
procedure?)
(if (pred parser location)(collect-bookpart-for-book parser book) ))
--snip--
to conditionally add bookparts or create books:
--snip--
writeBook = #(define-scheme-function (parser location book paper layout
file)(ly:book? ly:output-def? ly:output-def? string?)
(ly:book-process book paper layout file))
--snip--
(I know, it would also work with a scheme?-predicate, but type-safety is
IMHO a good thing ;-) )
Cheers, Jan-Peter
On 27.02.2012 10:10, David Kastrup wrote:
Jan-Peter Voigt<jp.vo...@gmx.de> writes:
Am 24.02.2012 um 16:24 schrieb:
Jan-Peter Voigt<jp.vo...@gmx.de> writes:
Hello list,
when I use books or bookparts for (scheme-)function arguments, I
haven't found the predicate for it.
paper-book? is something else, or am I missing something?
Well, you can always use scheme? and file a feature request in the mean
time.
Thank you David,
the scheme?-solution is what I do right now. I will send a feature
request next days.
Don't bother.
commit 09814b549186893c265bcdf835edbe242f6354cf
Author: David Kastrup<d...@gnu.org>
Date: Sun Feb 26 11:23:39 2012 +0100
Implement ly:book? and ly:context-def? predicates
Note that a bookpart _is_ a book as well, usually without a paper block
of its own.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user