[Haskell-cafe] no sparks?
gcross at phys.washington.edu
Sun Dec 20 19:00:03 EST 2009
On Dec 20, 2009, at 2:25 PM, Jamie Morgenstern wrote:
> Also, I was wondering if something akin to a "parallel or" exists. By this, I mean I am looking for a function which, given x : a , y : a, returns
> either, whichever computation returns first. Can I use strategies to code up something like this?
> I suppose this doesn't play nicely with the idea of determinism, but thought it might be worth asking
There is in fact a package that seems to do exactly that; look up "unamb" (short for "unambiguous choice") on Hackage.
More information about the Haskell-Cafe