X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fc%2B%2B.scm;h=badac67e5ca6f3a5ba3613edf46747b191ecbc38;hb=6089615c24e374ba2902e9a31940e1e8fe04a539;hp=8f4986a257ba72fe1ef0cefba10f792062cb2c6f;hpb=44dd3acc534e7a534f846810b481c3f603eaa92e;p=lilypond.git diff --git a/scm/c++.scm b/scm/c++.scm index 8f4986a257..badac67e5c 100644 --- a/scm/c++.scm +++ b/scm/c++.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen +;;;; Copyright (C) 1998--2015 Jan Nieuwenhuizen ;;;; Han-Wen Nienhuys ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify @@ -25,10 +25,19 @@ (and (pair? x) (number? (car x)) (number? (cdr x)))) +(define-public (number-pair-list? x) + (and (list? x) + (every number-pair? x))) + (define-public (fraction? x) (and (pair? x) (index? (car x)) (index? (cdr x)))) +(define-public (rational-or-procedure? x) + (or + (and (rational? x) (exact? x)) + (procedure? x))) + (define-public (number-or-grob? x) (or (ly:grob? x) (number? x))) @@ -45,6 +54,9 @@ (and (pair? x) (ly:moment? (car x)) (ly:moment? (cdr x)))) +(define-public (boolean-or-number? x) + (or (boolean? x) (number? x))) + (define-public (boolean-or-symbol? x) (or (boolean? x) (symbol? x))) @@ -84,8 +96,6 @@ (define-public (scheme? x) #t) -(define-public (symbol-or-boolean? x) - (or (symbol? x) (boolean? x))) (define-public (void? x) (unspecified? x))