Orivej Desh | 19 Mar 2012 13:37
Picon
Favicon
Gravatar

#'shuffle docstring is misleading

#'shuffle docstring states that “Permuted sequence may share storage
with the original one.”  Actually it destructively modifies the
sequence.  In the case of vectors the two might be the same, but in the
case of lists I would say that something like (sort (copy-list l) …)
shares storage with the original list but (sort l …) does more than
that.

_______________________________________________
alexandria-devel mailing list
alexandria-devel <at> common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel
Nikodemus Siivola | 30 Mar 2012 17:06
Gravatar

Re: #'shuffle docstring is misleading

On 19 March 2012 14:37, Orivej Desh <orivej <at> gmx.fr> wrote:

> #'shuffle docstring states that “Permuted sequence may share storage
> with the original one.”  Actually it destructively modifies the
> sequence.  In the case of vectors the two might be the same, but in the
> case of lists I would say that something like (sort (copy-list l) …)
> shares storage with the original list but (sort l …) does more than
> that.

Fixed, thanks for the heads-up.

Cheers,

 -- nikodemus

_______________________________________________
alexandria-devel mailing list
alexandria-devel <at> common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel

Gmane