]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/c++.scm
CG: add lilypad repository
[lilypond.git] / scm / c++.scm
index a8b0d00c7ee74f7d466a25fe4859105fee1eb503..ded5e9b1209bc0c0be4627db018962d7196eb0f1 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 1998--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;                 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
@@ -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))))