-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
my favorite :)
thx
Am 04.11.2011 20:32, schrieb Benny Tsai:
> Oh that is cool!
>
> On Friday, November 4, 2011 12:11:43 PM UTC-6, Paul Mooser wrote:
>
> You could try using "every-pred" to combine your predicates, which
> I think would be equivalent
Oh that is cool!
On Friday, November 4, 2011 12:11:43 PM UTC-6, Paul Mooser wrote:
>
> 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
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 wrote:
> (let [type-pred #()
> bounds-check #()
> contact #()
> full-test
This is slightly shorter:
full-test (fn [element] (every? #(% element) [type-pred bounds-check
contact]))
On Friday, November 4, 2011 10:51:43 AM UTC-6, HamsterofDeath wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> here's a part of my clojureoids-code:
>
> (let [type-pred #()
>
Using collections:
(every? true? (map #(%1 %2) [func1 func2] (repeat common-argument)))
where func1 func2 are your functions. and common-argument is the
argument shared by them all.
Or something like this:
(every? true? (map #(%1 %2) [type-pred bounds-check contact] (repeat element)))
Granted
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
here's a part of my clojureoids-code:
(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-at