On Aug 14, 10:51 pm, Sean Devlin <francoisdev...@gmail.com> wrote:
> I'd start with you usage docs
>
> ;; usage:
> ;; (filter-collecting
> ;;   (fn [x y] (< x y))
> ;;   (fn [x y] (+ x y))
> ;;   [1 7 3 9]
> ;;   [5 5 5 5])
> ;;  ==> (6 8)

;; usage:
;; (filter-collecting < +
;;   [1 7 3 9]
;;   [5 5 5 5])
;;  ==> (6 8)

(defn filter-collecting [c f & seqs]
  (remove nil?
    (apply map (fn [& args] (when (apply c args)
                                           (apply f args)))
                       seqs)))

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