6 lines
180 B
Haskell
6 lines
180 B
Haskell
|
-- Version 7
|
||
|
-- Generally it is considered a good practice
|
||
|
-- to import only the necessary function(s)
|
||
|
import Data.List (foldl')
|
||
|
evenSum l = foldl' (\x y -> x+y) 0 (filter even l)
|