[Haskell-cafe] Unambiguous choice implementation

Bartosz Milewski bartosz at fpcomplete.com
Sat Jun 23 20:54:10 CEST 2012


I'm reading Conal Elliot's paper, Push-Pull FRP. At some point he needs an
unambiguous choice operator, essentially to implement select: a future that
waits for one of its future arguments to fire. His implementation of unamb
creates two threads racing on a shared MVar. By his own admission, this is
very inefficient. My question is, is there a better implementation?
-- 
[:Bartosz:]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120623/ca95adf0/attachment.htm>


More information about the Haskell-Cafe mailing list