Quote:
how can i make a "while" in common lisp? (i know that scheme has "while", and in common lisp there is "loop" macro, but there is something like scheme's "while"?)
|
I haven't encountered a while, but there is a do (as well as, dotimes and dolist). The for macro is an abstraction over do in the first place. You can probably write a macro over do to create a while as well.
Code:
(do ((i 0 (1+ i))) ;; start, and increment at each iteration
((>= i 4)) ;; loop while this is false
(print i)) ;; action
Quote:
how can i make a recursive lambda function?
|
I can't see a way to get that without naming the function (through a defun or set, whatever). Maybe there is some variable in Common Lisp that can get you the reference to the current function.
Btw, if haven't encountered it yet, there is a new book on Common Lisp that just got published and it's also available for free online:
Practical Common Lisp