LEFT | RIGHT |
1 ;;;; c++.scm -- implement Scheme frontends to C++ functions | 1 ;;;; c++.scm -- implement Scheme frontends to C++ functions |
2 ;;;; | 2 ;;;; |
3 ;;;; source file of the GNU LilyPond music typesetter | 3 ;;;; source file of the GNU LilyPond music typesetter |
4 ;;;; | 4 ;;;; |
5 ;;;; (c) 1998--2009 Jan Nieuwenhuizen <janneke@gnu.org> | 5 ;;;; (c) 1998--2009 Jan Nieuwenhuizen <janneke@gnu.org> |
6 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 6 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> |
7 | 7 |
8 ;;; Note: this file can't be used without LilyPond executable | 8 ;;; Note: this file can't be used without LilyPond executable |
9 | 9 |
10 | 10 |
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
12 ;; type predicates. | 12 ;; type predicates. |
13 (define-public (number-pair? x) | 13 (define-public (number-pair? x) |
14 (and (pair? x) | 14 (and (pair? x) |
15 (number? (car x)) (number? (cdr x)))) | 15 (number? (car x)) (number? (cdr x)))) |
16 | 16 |
17 (define-public (number-or-grob? x) | 17 (define-public (number-or-grob? x) |
18 (or (ly:grob? x) (number? x))) | 18 (or (ly:grob? x) (number? x))) |
19 | 19 |
20 (define-public (grob-list? x) | 20 (define-public (grob-list? x) |
21 (list? x)) | 21 (list? x)) |
22 | 22 |
23 (define-public (moment-pair? x) | 23 (define-public (moment-pair? x) |
24 (and (pair? x) | 24 (and (pair? x) |
25 (ly:moment? (car x)) (ly:moment? (cdr x)))) | 25 (ly:moment? (car x)) (ly:moment? (cdr x)))) |
26 | 26 |
27 (define-public (boolean-or-symbol? x) | 27 (define-public (boolean-or-symbol? x) |
28 (or (boolean? x) (symbol? x))) | 28 (or (boolean? x) (symbol? x))) |
29 | |
30 (define-public (pair-or-symbol? x) | |
31 (or (pair? x) (symbol? x))) | |
32 | 29 |
33 (define-public (string-or-symbol? x) | 30 (define-public (string-or-symbol? x) |
34 (or (string? x) (symbol? x))) | 31 (or (string? x) (symbol? x))) |
35 | 32 |
36 (define-public (number-or-string? x) | 33 (define-public (number-or-string? x) |
37 (or (number? x) (string? x))) | 34 (or (number? x) (string? x))) |
38 | 35 |
39 (define-public (string-or-pair? x) | 36 (define-public (string-or-pair? x) |
40 (or (string? x) (pair? x))) | 37 (or (string? x) (pair? x))) |
41 | 38 |
(...skipping 14 matching lines...) Expand all Loading... |
56 (define-public (object-type obj) | 53 (define-public (object-type obj) |
57 (match-predicate obj type-p-name-alist)) | 54 (match-predicate obj type-p-name-alist)) |
58 | 55 |
59 (define-public (object-type-name obj) | 56 (define-public (object-type-name obj) |
60 (type-name (match-predicate obj type-p-name-alist))) | 57 (type-name (match-predicate obj type-p-name-alist))) |
61 | 58 |
62 (define-public (type-name predicate) | 59 (define-public (type-name predicate) |
63 (let ((entry (assoc predicate type-p-name-alist))) | 60 (let ((entry (assoc predicate type-p-name-alist))) |
64 (if (pair? entry) (cdr entry) | 61 (if (pair? entry) (cdr entry) |
65 "unknown"))) | 62 "unknown"))) |
LEFT | RIGHT |