I've done this too:

For the Compleat Fan
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

I've done this too:

Post by cormullion »

... forgetting to group expressions in a block after if, I mean. As described by teslafreak:

http://teslafreak.vox.com/library/post/ ... wlisp.html

I once wrote a macro that didn't need to 'begin', but couldn't do anything 'else':

Code: Select all

(define-macro (if* condition) 
(let (c (eval condition)) 
   (if c (map eval (args)))))

(if* true
   (println "yes")
   (println "I've")
   (println "done")
   (println "that")
   (println "too!"))
but more recently I've started using cond a bit more.

Fanda
Posts: 253
Joined: Tue Aug 02, 2005 6:40 am
Contact:

Post by Fanda »

Yes, it gets confusing in the beginning. I wrote 'if-else' to try a different solution:

http://newlisp-on-noodles.org/wiki/inde ... ol#if-else

Fanda

Locked