Hi,
On Aug 5, 8:05 am, John Harrop wrote:
> I just saw someone post a bunch of Clojure code to comp.lang.lisp one
> function from which was:
>
> (defn partition-with [pred coll]
> (loop [in coll curr [] out []]
> (if (empty? in)
> (conj out curr)
> (let [obj (first in)]
>
On Wed, Aug 5, 2009 at 08:05, John Harrop wrote:
> I just saw someone post a bunch of Clojure code to comp.lang.lisp one
> function from which was:
> (defn partition-with [pred coll]
> (loop [in coll curr [] out []]
> (if (empty? in)
> (conj out curr)
> (let [obj (first in)]
>
I just saw someone post a bunch of Clojure code to comp.lang.lisp one
function from which was:
(defn partition-with [pred coll]
(loop [in coll curr [] out []]
(if (empty? in)
(conj out curr)
(let [obj (first in)]
(if (pred obj)
(recur (rest in) [] (conj out curr