diff --git a/Control/Parallel/Strategies.hs b/Control/Parallel/Strategies.hs index cde91a5..8ad1989 100644 --- a/Control/Parallel/Strategies.hs +++ b/Control/Parallel/Strategies.hs @@ -296,14 +296,18 @@ withStrategy = flip using -- | Compose two strategies sequentially. -- This is the analogue to function composition on strategies. -- --- For any strategies @strat1@, @strat2@, and @strat3@, --- -- > (strat1 `dot` strat2) `dot` strat3 == strat1 `dot` (strat2 `dot` strat3) --- > strat1 `dot` strat1 = strat1 --- > strat1 `dot` r0 == strat1 +-- > strat `dot` r0 == strat +-- > rpar `dot` rseq == rpar +-- > rseq `dot` rpar == rseq -- -- > strat2 `dot` strat1 == strat2 . withStrategy strat1 -- +-- Furthermore, if @strat@ only forces and sparks computations (that is, it +-- doesn't actually change any values), then +-- +-- > strat `dot` strat == strat +-- dot :: Strategy a -> Strategy a -> Strategy a strat2 `dot` strat1 = strat2 . runEval . strat1