diff --git a/_posts/2013-09-05-higher-order-functions.markdown b/_posts/2013-09-05-higher-order-functions.markdown index cbe9764..0ba7465 100644 --- a/_posts/2013-09-05-higher-order-functions.markdown +++ b/_posts/2013-09-05-higher-order-functions.markdown @@ -190,7 +190,7 @@ sum xs = foldl (\acc n -> acc + n) 0 xs -- более простая реализация sum = foldl (+) 0 -product = foldl (*) 0 +product = foldl (*) 1 -- проверка, находится ли элемент в списке elem :: (Eq a) => a -> [a] -> Bool