emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

can `shuffle-vector' be moved?


From: Ted Zlatanov
Subject: can `shuffle-vector' be moved?
Date: Thu, 12 May 2011 14:58:31 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

I don't know where it should live, but cookie1.el doesn't seem like the
right place.

It should be documented in "(elisp) Vector Functions" as well.

Let me know if I should do this, please.

Also this loop call from Pascal Bourguignon is a nice CL alternative to
`shuffle-vector', though it uses the same algorithm:

(defun shuffle (vector)
  "Re-orders randomly the vector."
  (loop
      for i from (1-  (length vector)) downto 1
      do (rotatef (aref vector i) (aref vector (random i)))))

Can it go into cl-macs.el?

Thanks
Ted




reply via email to

[Prev in Thread] Current Thread [Next in Thread]