RosettaCodeData/Task/Conditional-structures/Clean/conditional-structures-4.clean

9 lines
184 B
Plaintext

answer x
| x == 42 = True
| otherwise = False
case 6 * 7 of
n | n < 0 -> "Not even close"
42 -> "Correct"
// no default, could result in a run-time error