lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Defining new Scheme predicates


From: Andrew Bernard
Subject: Defining new Scheme predicates
Date: Mon, 7 Nov 2016 11:07:04 +1100

Greetings All,

 

In lilypond, if I wanted to define a Scheme predicate such as side? to check whether an argument passed matches only ’left or ’right, how would one go about it?

 

Looking in lily.scm I see lists of lilypond specific predicates, but it is unclear to me how to create my own additions, and indeed, how they would be implemented (apart from the trivial function itself).

 

So for example, we have a function

 

someFunction =

#(define-music-function (thing position)

(number? side?)

…)

 

How to add such a predicate? Can you, without going under the hood?

 

 

Andrew

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]