Hi, to get compiled clj-contrib with the lastest version of clojure i
had to rewrite partition-by and replace lazy-cons with lazy-seq. I
think its wrong but it works!

umbly i wait yours corrections

(defn partition-by
  "Applies f to each value in coll, splitting it each time f returns
   a new value.  Returns a lazy seq of lazy seqs."
  [f coll]
  (when-let [s (seq coll)]
                (let [fv (f (first s))
                          ends (drop-while #(= fv (f %)) (next s))
                          tw (fn this [s]
                                (when (and (not= s ends) (seq s))
                                (lazy-seq (cons (first s) (this (next s))))))]
      (lazy-seq (cons (tw s) (partition-by f ends))))))

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to