support for switch/case
under review
Hazel
When formulating logical rules, you often end up with a bunch of ifs behind each other. It would be nice to have a more elegant expression like:
when
x <= 10 do a = 1
x <= 20 do a = 2
x <= 50 do a = 3
would replace the way less readable
if x <= 10 then a = 1
if x <= 20 && x > 10 then a = 2
if x <= 50 && x > 20 then a = 3
I recently stumbled upon this while trying to do a quick tax calculator thing in Soulver
Zac @ Soulver
under review
Thanks for the suggestion. Soulver doesn't have the notion of multi-line expressions at the moment, but I can see how it would be useful to have in this case.