On Aug 14, 3:43 pm, Fogus <mefo...@gmail.com> wrote:
> Wanna play golf?

ok...
Not efficient or elegant, but certainly weird...

(defn filter-collecting [p c & seqs]
  (let [fun #(if (apply p %1)
               (conj! %2 (apply c %1))
               %2)]

    (loop [hs (map first seqs)
           ts (map rest seqs)
           result (transient [])]

      (if (next (first ts))
        (recur (map first ts)
               (map rest ts)
               (fun hs result))

        (persistent! (fun hs result))))))
--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your 
first post.
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