Re: Boolean operations

Jeremy Tregunna <[email protected]> Thu, 01 Dec 2011 15:30:29 -0600
Newsgroups gmane.comp.lang.io
Message-ID <[email protected]>
Try

if((a == b) or c == d)

Sent from my iPhone

On 2011-12-01, at 7:51 AM, andrey <[email protected]> wrote:

> I am looking for boolean operations in Io. I need to write something like this:
> 
> if (a == b) or (c == d) ....
> 
> Now I have created such code:
> 
> divided_by := method(a, b,
> a % b == 0
> )
> 
> condition := method(a,
> if(divided_by(a, 3)) then (return true) else (
> if(divided_by(a, 5)) then (return true) else (return false)
> )
> )
> 
> But I am looking for the better solution.
> 
>