Created
December 18, 2011 15:40
-
-
Save manishym/1493729 to your computer and use it in GitHub Desktop.
if as a normal function in lisp
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
(define (new-if predicate then-clause else-clause) | |
(cond (predicate then-clause) | |
(else else-clause))) | |
(define (p) (p)) | |
(define (new-test x) | |
(new-if (= x 0) | |
1 | |
(p))) | |
(new-test 0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment