@@ -723,19 +723,20 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
723723-- 'fromZipAsync' type combinator can be used to switch to parallel applicative
724724-- zip composition:
725725--
726−-- This takes 7 seconds to zip, which is max (1,3) + max (2,4) because 1 and 3
727−-- are produced concurrently, and 2 and 4 are produced concurrently:
728−--
729726-- >>> d n = delay n >> return n
730−-- >>> s1 = Stream.fromSerial $ d 1 <> d 2
731−-- >>> s2 = Stream.fromSerial $ d 3 <> d 4
727+-- >>> s1 = Stream.fromSerial $ d 2 <> d 4
728+-- >>> s2 = Stream.fromSerial $ d 3 <> d 1
732729-- >>> (Stream.toList $ Stream.fromZipAsync $ (,) <$> s1 <*> s2) >>= print
733−-- ThreadId ...: Delay 1
734730-- ThreadId ...: Delay 2
735731-- ThreadId ...: Delay 3
732+-- ThreadId ...: Delay 1
736733-- ThreadId ...: Delay 4
737−-- [(1,3),(2,4)]
734+-- [(2,3),(4,1)]
738735--
736+-- The actions within each stream are executed serially, however, the two
737+-- streams are run concurrently with respect to each other. Therefore, it takes
738+-- 6 seconds to zip the two streams, which is the maximum of the time to
739+-- evaluate stream s1 (2 + 4 = 6 seconds) and stream s2 (3 + 1 = 4 seconds).
739740
740741-- $concurrent
741742--