[Ecls-list] Using Femlisp with ECL / Bug reports
Julian Stecklina
der_julian at web.de
Fri Aug 5 11:14:28 UTC 2005
On Fri, 05 Aug 2005 16:17:33 +0200
Nicolas Neuss <Nicolas.Neuss at iwr.uni-heidelberg.de> wrote:
> Loading single files apparently works. I will try to go through that.
> One thing that showed up is the following LOOP construct:
>
> (let ((list (list 1 2 3))
> (result ()))
> (loop for i = (pop list) while i
> for k = (* i i) do (push k result)
> finally (return result)))
Is there any reason why this is written so complicated (besides mixing
iterating forms with loop end tests)? Looks like
(for i in list
collect (* i i))
to me. Anyway, you might be better of using iterate. It solved a lot of
my loop problems.
Regards,
--
Julian Stecklina
LISP has survived for 21 years because it is an approximate local
optimum in the space of programming languages. - John McCarthy (1980)
More information about the ecl-devel
mailing list