diff --git a/examples/map-reduce.hs b/examples/map-reduce.hs index d86d71dcf..bd355698c 100644 --- a/examples/map-reduce.hs +++ b/examples/map-reduce.hs @@ -1,7 +1,6 @@ -import Data.List (sum) import Asyncly -import Asyncly.Prelude +import Asyncly.Prelude as A main = do - xs <- toList $ serially $ forEachWith (<|) [1..100] $ \x -> return (x * x) - print . sum $ xs + s <- A.sum $ serially $ forEachWith (<|) [1..100] $ \x -> return (x * x) + print s