Re: Recursion or interation...??




Robert Bralic WROTE:

> Hello,
>
> Doees anybody knows, what is better
> to use in LISP, recursion or interation...??
> (in situation when you can use both)
>
> Thanks in advance, Robert...!!!

It depends on your LISP implement. If your Lisp offers shallow stack
space for
recursion , very offen your job will burn out that stack space if you
code in recursion.
But recursion got its convenience , eg it's more expressive than the
iterative one.

For iteration , I am too stupid to remember those complicative
operators and their
syntax , eg do , dotimes , dolist ... I am so simple minded that I only
learned loop
plus conditions . And I am so foolished that I only learned "cond" for
conditioning.
I am very stupid but my codes still work. You can see :
http://groups.google.com.tw/group/comp.lang.lisp/msg/46338401c260b19c?dmode=source&hl=zh-TW
I hope you all enjoy that !!

.



Relevant Pages

  • Re: "C-like" syntax for Lisp in less than 100 lines of code
    ... function for the Fibonacci series. ... that Lisp has no point, it is a toy language for teaching recursion. ... :-) I am guilty of liking these toys as well. ...
    (comp.lang.lisp)
  • Re: Making Lisp popular - can it be done?
    ... “hack” for recursion. ... We already have to think about how to do tail ... (recur (dec n) ... experience with implementing Lisp, ...
    (comp.lang.lisp)
  • Re: kernel stack challenge
    ... > infinite loop, and eventually ... Separate logical copy of LISP program is for each ... subsystem we protect. ... > recursion is at all interesting or useful.... ...
    (Linux-Kernel)
  • Re: How to make mod_lisp faster than php?
    ... In the Lisp group, the first fellow will answer, "I know my opinion, ... There seem to be various levels of acceptance of deep recursion ... It's possible that Scheme is here because a standard implementation of call/cc which puts stack frames on the heap yields this property. ... I think that implies tail recursion, ...
    (comp.lang.lisp)
  • Re: Beginners Question on an exercise from Grahams ACL
    ... > just been taught and to exercise my brain on them - not with some other ... Recursion might be more worthwhile as a separate item to learn, ... than binding up lisp and recursion into a single package of pain. ... Alternate places than lisp materials might teach it better, ...
    (comp.lang.lisp)