X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fc%2B%2B.scm;h=a8b0d00c7ee74f7d466a25fe4859105fee1eb503;hb=81183099c749ee5c1160d12ba0cc747f04bee159;hp=74f58f4da3f4da2449535f0faf6ca1034c85dcd0;hpb=55ac733b69643a6bc6a83b706c65cb56efd388ef;p=lilypond.git diff --git a/scm/c++.scm b/scm/c++.scm index 74f58f4da3..a8b0d00c7e 100644 --- a/scm/c++.scm +++ b/scm/c++.scm @@ -25,12 +25,20 @@ (and (pair? x) (number? (car x)) (number? (cdr x)))) +(define-public (fraction? x) + (and (pair? x) + (integer? (car x)) (integer? (cdr x)) + (>= (car x) 0) (>= (cdr x) 0))) + (define-public (number-or-grob? x) (or (ly:grob? x) (number? x))) (define-public (grob-list? x) (list? x)) +(define-public (number-list? x) + (and (list? x) (every number? x))) + (define-public (moment-pair? x) (and (pair? x) (ly:moment? (car x)) (ly:moment? (cdr x)))) @@ -61,6 +69,9 @@ (define-public (symbol-or-boolean? x) (or (symbol? x) (boolean? x))) +(define-public (void? x) + (unspecified? x)) + ;; moved list to end of lily.scm: then all type-predicates are ;; defined. (define type-p-name-alist '())