on f7e771c help sign in
streamly/examples/map-reduce.hs
6 lines 155 B history raw
1import Data.List (sum)
2import Asyncly
4main = do
5 xs <- toList $ forEachWith (<|) [1..100] $ \x -> return (x * x) :: AsyncT IO Int
6 print . sum $ xs