You could try using "every-pred" to combine your predicates, which I
think would be equivalent:

(let [full-test (every-pred type-pred bounds-check contact)]
   ...

On Nov 4, 9:51 am, Dennis Haupt <d.haup...@googlemail.com> wrote:
>   (let [type-pred #()
>         bounds-check #()
>         contact #()
>         full-test (fn [element] (and (type-pred element) (bounds-check
> element) (contact element)))]
>   (filter full-test (:game-elements @world-atom))
>
> is there a way to write the full-test in a way that doesn't force me
> to repeat the "function <constant text>" pattern inside the and?

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