X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fc%2B%2B.scm;h=ded5e9b1209bc0c0be4627db018962d7196eb0f1;hb=27778e71840f517d1ed4ab3529051809ef4cbd74;hp=7d5c85a8bee6ee8e3df34c4e722840c283bb2b50;hpb=d61cf3bbdb1c6670a127ba3baddf2f04d3e34fd3;p=lilypond.git diff --git a/scm/c++.scm b/scm/c++.scm index 7d5c85a8be..ded5e9b120 100644 --- a/scm/c++.scm +++ b/scm/c++.scm @@ -27,8 +27,7 @@ (define-public (fraction? x) (and (pair? x) - (integer? (car x)) (integer? (cdr x)) - (>= (car x) 0) (>= (cdr x) 0))) + (index? (car x)) (index? (cdr x)))) (define-public (number-or-grob? x) (or (ly:grob? x) (number? x))) @@ -39,6 +38,9 @@ (define-public (number-list? x) (and (list? x) (every number? x))) +(define-public (index? x) + (and (integer? x) (>= x 0))) + (define-public (moment-pair? x) (and (pair? x) (ly:moment? (car x)) (ly:moment? (cdr x))))