Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

if

Name: Anonymous 2008-01-12 16:36

how do i wrote if statements in LISP?

Name: Anonymous 2008-01-12 17:57

(when <cond>
   <s-exps>*)
(unless (not <cond>)
    <s-exps>*)


But you really should define a macro:
(defmacro .if (test if-true &body if-false)
   `(progn (when ,test ,if-true) (when (not ,test) ,@if-false)))

.IF
0] (.if t (print 3) (print 4))


NIL3
0]



Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List