blob: 471ca82dff68a05f9e00fe0dcd3f190ab48b8ad3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-- Foo performs foo and sometimes bar.
foo ::
Thoroughness ->
Int ->
Int
foo t x =
if x > 20
then case t of
Thorough -> x + 50
Somewhat -> x + 20
NotAtAll -> 0
else 10 + 1
|