17 Jul 23:13
[groovy-user] Idea / a better way to do this?
From: Marc Palmer <marc@...>
Subject: [groovy-user] Idea / a better way to do this?
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-07-17 21:17:29 GMT
Subject: [groovy-user] Idea / a better way to do this?
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-07-17 21:17:29 GMT
Hi,
I wanted to see if a condition holds for all elements in a collection,
but I cannot (it is late) see a clean simple way of doing this using
the GDK.
We don't seem to have something like:
def allmatch = someList.holdsTrue { it.age > 25 }
I can't see how to do this at the moment without an external var of
some kind to track state - maybe I'm missing something?
If not, shall I jira this for 2.0?
Marc
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
RSS Feed