On 01/23/2010 12:29 AM, strtr wrote:
Simen kjaeraas Wrote:


Not tested, but they should work:

if ( anySame( var, a, b, c, d ) ) {
}

if ( allSame( var, a, b, c, d ) ) {
}


A lot prettier.
I thought there would be a generic (basic) solution to this which I just didn't 
know about but maybe I actually do know the basics by now :)
--
Simen

If we get opIn_r for arrays, you can do

if (var in [a, b, c, d]) {
}

Which I find a lot prettier.

Reply via email to