RosettaCodeData/Task/Variables/Haskell/variables-4.hs

5 lines
132 B
Haskell

funkshun m = case foo m of
[a, b] -> a - b
a : b : c : rest -> a + b - c + sum rest
a -> sum a