all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* can `shuffle-vector' be moved?
@ 2011-05-12 19:58 Ted Zlatanov
  2011-05-13  2:03 ` Leo
  2011-05-13  6:19 ` Thierry Volpiatto
  0 siblings, 2 replies; 16+ messages in thread
From: Ted Zlatanov @ 2011-05-12 19:58 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-05-13 17:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12 19:58 can `shuffle-vector' be moved? Ted Zlatanov
2011-05-13  2:03 ` Leo
2011-05-13  2:10   ` Stefan Monnier
2011-05-13  3:49     ` Ted Zlatanov
2011-05-13 13:57       ` Stefan Monnier
2011-05-13  3:53   ` Ted Zlatanov
2011-05-13  6:00     ` Kevin Rodgers
2011-05-13 14:48       ` Ted Zlatanov
2011-05-13 15:26         ` Stefan Monnier
2011-05-13 16:22           ` Ted Zlatanov
2011-05-13 16:47             ` Stefan Monnier
2011-05-13 16:51               ` Ted Zlatanov
2011-05-13  6:19 ` Thierry Volpiatto
2011-05-13 14:00   ` Stefan Monnier
2011-05-13 14:38     ` Ted Zlatanov
2011-05-13 17:13     ` Thierry Volpiatto

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.