SLOOP -> ANSI LOOP translation



allegro common lisp returns  (0 1) and is likely to be
correct.


ole.rohne@cern.ch wrote:

>Raymond> While not opposing this change, I think the nice thing about
>Raymond> using sloop is that everyone uses the same sloop
>Raymond> implementation, unlike the maze of twisty little
>Raymond> implementations, all different, that is ANSI loop.
>
>Turning that around, I'd wonder if maxima could help in exposing CL
>implementations deviating from the standard, and perhaps clarifying
>what the standard is?
>
>It would be interesting to know what implementations return for the
>following:
>
>(defun nleft (n x &optional tail)
>  (loop for v on (nthcdr n x)
>        for w on x
>        when (eq v tail) do (return w)
>        finally (return w)))
>
>(nleft 1 '(0 1))
>
>SLOOP says '(1), while MIT LOOP says '(0 1). I had assumed MIT LOOP is
>correct but I haven't checked.
>
>Ole
>
>
>
>
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>  
>