Re: groups-of

2008-12-19 Thread Chouser
On Fri, Dec 19, 2008 at 9:37 AM, Michael Wood wrote: > > On Fri, Dec 19, 2008 at 4:35 PM, Michael Wood wrote: >> >> hmmm... if I do this: >> >> user=> (partition 2 1 (iterate inc 1)) (.printStackTrace *e) >> >> it ends like this: >> >> [...] >> 57) (587257 587258) (587258 587259) (587259 587260

Re: groups-of

2008-12-19 Thread Michael Wood
On Fri, Dec 19, 2008 at 4:35 PM, Michael Wood wrote: > On Fri, Dec 19, 2008 at 4:32 PM, Rich Hickey wrote: >> >> On Dec 19, 8:59 am, "Michael Wood" wrote: [...] >>> There is a function called partition in Clojure's core.clj that does >>> this, except it does not pad, but rather discards any inc

Re: groups-of

2008-12-19 Thread Michael Wood
On Fri, Dec 19, 2008 at 4:32 PM, Rich Hickey wrote: > > On Dec 19, 8:59 am, "Michael Wood" wrote: >> On Fri, Dec 19, 2008 at 1:02 PM, hosia...@gmail.com >> wrote: >> >> > I'm learning Clojure by trying to implement some functions from Ruby >> > core/stdlib/ActiveSupport's core_ext. >> >> > The

Re: groups-of

2008-12-19 Thread Rich Hickey
On Dec 19, 8:59 am, "Michael Wood" wrote: > On Fri, Dec 19, 2008 at 1:02 PM, hosia...@gmail.com > wrote: > > > I'm learning Clojure by trying to implement some functions from Ruby > > core/stdlib/ActiveSupport's core_ext. > > > The first one I wrote is groups-of (similar to ActiveSupport's >

Re: groups-of

2008-12-19 Thread Michael Wood
On Fri, Dec 19, 2008 at 1:02 PM, hosia...@gmail.com wrote: > > I'm learning Clojure by trying to implement some functions from Ruby > core/stdlib/ActiveSupport's core_ext. > > The first one I wrote is groups-of (similar to ActiveSupport's > in_groups_of): > > (defn groups-of > "Returns coll in g