On Jan 3, 9:22 pm, Timothy Pratley wrote:
> 2010/1/4 Tom Hicks :
>
> > All the other code is there to parallel the functionality in 'subvec'.
>
> Ah right, I see what you mean.
> Calling count in the two argument form will realize the entire
> sequence unnecessarily. Take and drop are already lazy
2010/1/4 Tom Hicks :
> All the other code is there to parallel the functionality in 'subvec'.
Ah right, I see what you mean.
Calling count in the two argument form will realize the entire
sequence unnecessarily. Take and drop are already lazy so no need to
call lazy-seq... so if you wanted to expl
On Jan 3, 7:06 pm, Timothy Pratley wrote:
> 2010/1/4 Tom Hicks :
>
> > Comments and code review welcome
>
> Hi Tom,
>
> Some interesting additions. Regarding sub-sequence it might also be
> written like so:
>
> (defn subseq2
> [coll start end]
> (take (- end start) (drop start coll)))
> ; (su
Tom,
The reason you couldn't find a parallel posting is because I didn't
make one :)
I like the two fns you described, they look useful.
You can find all of the sequence fns I'd propose in the two libs below
Simple collection fns
http://github.com/francoisdevlin/devlinsf-clojure-utils/blob/maste
2010/1/4 Tom Hicks :
> Comments and code review welcome
Hi Tom,
Some interesting additions. Regarding sub-sequence it might also be
written like so:
(defn subseq2
[coll start end]
(take (- end start) (drop start coll)))
; (subseq2 [0 1 2 3 4] 1 3)
; = (1 2)
There is a clash with core's exis
A couple weeks ago Sean Devlin posted a blog entry asking for thoughts
on
new sequence functions (and posting many useful proposed functions
himself).
http://fulldisclojure.blogspot.com/2009/12/new-seq-utilities.html
I searched for, but didn't find, a parallel posting in this forum
(even though
I