On Thu, Apr 23, 2009 at 1:11 AM, Christophe Grand <christo...@cgrand.net> wrote:
>
> Hi all!
>
> (defn mystery-function [pred coll]
>  (lazy-seq
>    (when (seq coll)
>      (let [[run etc] (split-with pred coll)]
>        (if (seq run)
>          (concat run (cons :foo (mystery-function pred etc)))
>          (cons (first coll) (mystery-function pred (rest coll))))))))

Ah yes, that looks like the one :)

-- 
Michael Wood <esiot...@gmail.com>

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