[Haskell-cafe] Concurrent with monads

Jiansen He jiansenhe at googlemail.com
Sun Nov 14 19:36:48 EST 2010

Hi cafe,

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

Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101115/0daf03b5/attachment.html

More information about the Haskell-Cafe mailing list