[Haskell-cafe] How to implement `amb' operator?

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Wed Apr 7 14:29:00 EDT 2004

> Hi,
>   I think it's good idea to compute non-deterministic problems with the `amb'
> operator, just as in LISP/scheme. But how to implement it in haskell?

Do you mean "evaluate e1 and e2, and return the result of whichever 
returns first"?

Probably best to do this using threads.

--KW 8-)
Keith Wansbrough <kw217 at cl.cam.ac.uk>
University of Cambridge Computer Laboratory.

More information about the Haskell-Cafe mailing list