par declared as:
par :: a -> b -> b
Note that this argument is discarded. To use steam, you need to play tricks, for example, using the same expression several times.
If its purpose is to execute a and b in parallel, why it has not been defined like this:
par :: (a, b) -> (a, b)
Taking a tuple of (unvalued) expressions and returning the same expressions - while they potentially materialize in the background threads.
It seems the last model is simpler than the first. Why was the design chosen in this way?
source
share