X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fc%2B%2B.scm;h=48f54d3582b77fb6a426803b55022c2da33de424;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=f0c5d3aea9f546980949318d6498d1dcef483ba8;hpb=07f7ea94c774c7b746a0e7b703bc4a709b73eabf;p=lilypond.git diff --git a/scm/c++.scm b/scm/c++.scm index f0c5d3aea9..48f54d3582 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))) @@ -98,8 +107,8 @@ (if (null? alist) "Unknown type" (if (apply (caar alist) obj) - (cdar alist) - (match-predicate obj (cdr alist))))) + (cdar alist) + (match-predicate obj (cdr alist))))) (define-public (object-type obj) (match-predicate obj type-p-name-alist))