on master help sign in
Merge pull request #24 from Abhiroop/product

Fix product

commit78f2ec87f26efeef10036d83dc40226b81d7a0f9 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 14 Mar 2018, 13:02 (9 years ago) parent729ccc8ee73813
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)