From ... From: Erik Naggum Subject: Re: newbie needs simple help Date: 2000/11/10 Message-ID: <3182859272653997@naggum.net>#1/1 X-Deja-AN: 692053810 References: <8uh2ah$57q$1@lure.pipex.net> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 973870477 7430 195.0.192.66 (10 Nov 2000 15:34:37 GMT) Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Mime-Version: 1.0 NNTP-Posting-Date: 10 Nov 2000 15:34:37 GMT Newsgroups: comp.lang.lisp * "dalmas" | (defun myloop (x) | (loop | (progn (print x) | (setf x (1- x)))) You can lose the progn. | but i cant work out where to put in an escape clause (until (= x 0)) . (when (= x 0) (return)) escapes from the (simple) loop body. If you want a more interesting view on loop, the extended loop offers a much broader and more interesting approach, as in: (loop for x from 100 above 0 do (print x)) However, in this particular case, you probably want a more specialized form (although this prints in reverse order from what you specified): (dotimes (x 100) (print x)) I suggest you return to that mental state where you don't know the language (like learning your first language) and only after you learn something in it, compare it with other languages you know, if you at all find that necessary in this learning process. This won't take any more time than trying to match things up before you understand them. Quite the contrary, in fact. #:Erik -- ALGORITHM: a procedure for solving a mathematical problem in a finite number of steps that frequently involves repetition of an operation. ALGOREISM: a procedure for solving an electoral problem in a finite number of steps that frequently involves repetition of an operation.