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

9 lines
184 B
Text
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
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