() .
main = print (f [1..4000000] (0 :: Int, 1 :: Int))
main = print (f list (0 :: Int, 1 :: Int))
where
list = [1..4000000]
, main.list/main/Main.CAF, , 4M- . , , , [Integer]. [Int], .
, f/main/... , . , , .
,
f [] c = c
f (x:xs) c = f xs $! tick x c
tick x (c0,c1) | even x = (,) c0 $! c1+1
| otherwise = ((,) $! c0+1) c1
, Int.
GHC 8.0.1 , -O2.
, , , GHC / . .