Re: (loop initially ... getting non-ANSI CL warning
- From: Maciej Katafiasz <mathrick@xxxxxxxxx>
- Date: Tue, 22 Jan 2008 12:11:32 +0000 (UTC)
Den Tue, 22 Jan 2008 02:46:53 -0800 skrev Mirko.Vukovic:
I am still in a bit of shock that my first loop attempt works, with one[snip]
legalistic exception.
This is my simple code to show duplicates in a list:
(defun show-duplicates (list)
(loop
initially with ref = (first list)
for entry in (rest list) do
(if (equal ref entry)
(print entry))
(setf ref entry)))
Using clisp on windows+cygwin+emacs+slime, I get the following warning
upon compilation:
WARNING: LOOP: missing forms after INITIALLY: permitted by CLtL2,
forbidden by
ANSI CL.
The code seems to work:
I could not find examples that would show me the problem with my
"initially" form.
Just remove it. WITH already establishes bindings. Besides, have you
tried ITERATE? Well-documented, extensible and much more lispish in
syntax.
Cheers,
Maciej
.
- References:
- (loop initially ... getting non-ANSI CL warning
- From: Mirko . Vukovic
- (loop initially ... getting non-ANSI CL warning
- Prev by Date: Re: nconc and function parameters [newbie]
- Next by Date: Re: (loop initially ... getting non-ANSI CL warning
- Previous by thread: Re: (loop initially ... getting non-ANSI CL warning
- Next by thread: Re: (loop initially ... getting non-ANSI CL warning
- Index(es):
Relevant Pages
|