Arbor icon indicating copy to clipboard operation
Arbor copied to clipboard

Implement predicate syntax

Open radding opened this issue 7 years ago • 0 comments

This statement should look like:

(a, b) -> 
    : a > b -> 
        return doSomething();
    : a < b -> 
        return doSomethingElse();
    : true -> 
        return doTheLastThing();
    done;
done;

This is the same as

(a, b) ->
    if(a > b) ->
        return doSomething();
    else if (a < b) ->
        return doSomethingElse();
    else -> 
        return doTheLastThing();
    done;
done;

radding avatar Nov 06 '17 17:11 radding