Skip to content

Instantly share code, notes, and snippets.

@manishym
Created December 18, 2011 15:40
Show Gist options
  • Save manishym/1493729 to your computer and use it in GitHub Desktop.
Save manishym/1493729 to your computer and use it in GitHub Desktop.
if as a normal function in lisp
(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