on master help sign in
Fix product
commitee738138c5f96eb990777c23e175c7ddb271d1c6 authorAbhiroop Sarkar <asiamgenius@gmail.com> dateTue 13 Mar 2018, 22:40 (9 years ago) parent729ccc8
1 file changed+1−1
src/Streamly/Prelude.hs+1−1
src/Streamly/Prelude.hs+1−1
@@ -324,7 +324,7 @@ sum = foldl (+) 0 id
324324
325325-- | Determine the product of all elements of a stream of numbers
326326product :: (Streaming t, Monad m, Num a) => t m a -> m a
327−product = foldl (*) 0 id
327+product = foldl (*) 1 id
328328
329329-- | Extract the first element of the stream, if any.
330330head :: (Streaming t, Monad m) => t m a -> m (Maybe a)