Created
March 11, 2012 07:12
-
-
Save mugyu/2015387 to your computer and use it in GitHub Desktop.
Schemeで等価述語以外の述語の例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(pair? '(1)) ; => #t | |
(null? '()) ; => #t | |
(list? (list)) ; => #t | |
(boolean? #f) ; => #t | |
(symbol? 'example) ; => #t | |
(number? 1) ; => #t | |
(char? #\a) ; => #t | |
(string? "string") ; => #t | |
(odd? 1) ; => #t | |
(even? 2) ; => #t | |
(zero? 0) ; => #t | |
(char-alphabetic? #\a) ; => #t | |
(proper-list? '(1 2)) ; => #t | |
(proper-list? '(1 . 2)) ; => #f | |
(any odd? '(1 2)) ; => #t | |
(any odd? '(2 4)) ; => #f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment