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

5 lines
132 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
funkshun m = case foo m of
[a, b] -> a - b
a : b : c : rest -> a + b - c + sum rest
a -> sum a