[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
recursive count down
- To: comp-lang-lisp-mcl@services.cambridge.apple.com
- Subject: recursive count down
- From: jamila@neptune.gsfc.nasa.gov (Jamila Saleh)
- Date: 16 Jul 1994 19:10:37 GMT
- Distribution: world
- Newsgroups: comp.lang.lisp.mcl
- Organization: NASA Code 971, Oceans & Ice Branch
I am trying to write a function that performs a count-down operation. I have
coded the following using standard textbook material:
(defun Count-down (number)
(cond ((= number 0) nil)
(t (print number) (Count-down (- num 1)))))
Running the above with **(Count-down 4)** results in **0 is not a sequence**
If anyone knows what is wrong with the code please let me know.
I can be reached also at jamila@jamila.gsfc.nasa.gov
THANX!!!
Keywords: