"Abhijit A. Mahabal" <[EMAIL PROTECTED]> writes:

> On the other hand, if you wanted to say "true for all except exactly
> one value, I can't think of a way. 
  
Easy.  The following two statements are equivalent:

F(x) is true for all but exactly one x
(not F(x)) is true for exactly one x

The only additional possibility that can't be phrased in terms of the
four given is the complex generalised case:

F(x) is true for at least n but not more than m values of x

So for example you could have a list of fifty values for x and test
whether the condition is true for at least ten but not more than
fourty of them.  (Or, x could be the condition; you could have a list
of fifty conditions and test whether between twenty and thirty of them
were true.)  My guess is, however, that the frequency with which
anyone would use such a capability would not be overwhelming.  

It would be great for obfuscation, though, particularly if some of the
conditions had side effects with an impact on the value of the other
conditions to be tested...  That would be sufficiently interesting
that it's almost a shame I can't think of a real reason to request
such a feature, since I rather doubt anyone's going to much fancy
implementing it just for obfuscatory value ;-)

-- 
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,"[EMAIL PROTECTED]/ --";$\=$ ;-> ();print$/

Reply via email to