We already have the ternary operator, but I find it can get hard to maintain when used often in one statement. Sparkling some do { .. }'s in only makes it a bit better.sub is_even { if (shift % 2) { 0 } else { 1 } }
In reply to Re^2: "return" to break out of a loop
by phaylon
in thread "return" to break out of a loop
by weedom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |