James Edward Gray II <james / grayproductions.net> writes:

>>> class Object
>>>   def true?
>>>     yield self if self
>>>     self
>>>   end
>>>   def false?
>>>     yield self unless self
>>>     self
>>>   end
>>> end
> => nil
>>> (1 == 2).true? { puts "True!" }.false? { puts "False!" }
> False!
> => false
>>> (1 != 2).true? { puts "True!" }.false? { puts "False!" }
> True!
> => true
>
> Hope that gives you some fresh ideas.

*hears 1000 functional programmers whine about return values getting lost*

> James Edward Gray II
-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org