Thanks Ray. That's much nicer than whatever I would have come up with. Maybe the ease of implementing it was the reason rotations went away (if it did).
On Tuesday, February 11, 2014 3:49:56 AM UTC-6, Ray Miller wrote: > > I'm not sure if that function exists in a new contrib library, but > it's trivial to implement: > > (defn rotations [xs] (take (count xs) (partition (count xs) 1 (cycle > xs)))) > > On 11 February 2014 05:53, Mars0i <mars...@logical.net <javascript:>> > wrote: > > At one time there was a function named "rotations" in > clojure.contrib.seq, > > and at another time in clojure.contrib.seq-utils . Neither of these > > libraries seem to be present as of Clojure 1.5, and I am not finding > > rotations anywhere else. Does rotations exist? I can write it myself, > but > > don't want to duplicate something that's part of a library. (Maybe I'm > just > > being clueless and missing something obvious.) > > > > (rotations returned rotated versions of a seq, I believe: > > > > (rotations [1 2 3]) > > => > > ((1 2 3) (2 3 1) (3 2 1)) > > > > perhaps in a different order. > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clo...@googlegroups.com<javascript:> > > Note that posts from new members are moderated - please be patient with > your > > first post. > > To unsubscribe from this group, send email to > > clojure+u...@googlegroups.com <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > --- > > You received this message because you are subscribed to the Google > Groups > > "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to clojure+u...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.