[Haskell-cafe] Concurrent with monads
jiansenhe at googlemail.com
Sun Nov 14 19:36:48 EST 2010
I wounder if it is possible to tell a haskell system that two computations
with side effects could be executed concurrently.
Here is an affected example:
Suppose two people want to compare their age, but do not want to leak their
personal information. The following program reads one person's age after
another then send back compared result.
age :: IO ()
age = do
i <- readIntFrom a
j <- readIntFrom b
writeTo a (i-j)
writeTo b (j-i)
How can I express the fact that two readings could be carried out in any
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe