Created
March 10, 2012 21:25
-
-
Save mugyu/2013285 to your computer and use it in GitHub Desktop.
schemeで等価述語の例
This file contains hidden or 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
(equal? (list 1 2 3) (list 1 2 3)) ; => #t | |
((lambda (p) (eq? p p)) (cons 1 2)) ; => #t | |
(eq? 'example 'example) ; => #t | |
(eqv? 1 1) ; => #t | |
(eqv? 1 1.0) ; => #f | |
(= 1 1.0) ; => #t | |
(char=? #\a #\a) ; => #t | |
(string=? "example" "example") ; => #t | |
(char-ci=? #\a #\A) ; => #t | |
(string-ci=? "example" "EXAMPLE") ; => #t | |
(not #f) ; => #t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment