Hello,
the Advanced Monads page in the Haskell Wikibook
(http://en.wikibooks.org/wiki/Haskell/Advanced_monads) contains the following
example of a List Monad
pythags = do
x - [1..]
y - [x..]
z - [y..]
guard (x^2 + y^2 == z^2)
return (x, y, z)
However,
Check out Hoogle: http://haskell.org/hoogle/?q=guard
import Control.Monad
-Greg
On 2/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello,
the Advanced Monads page in the Haskell Wikibook
(http://en.wikibooks.org/wiki/Haskell/Advanced_monads) contains the
following
example of a List
On Feb 12, 2007, at 11:02 AM, [EMAIL PROTECTED] wrote:
Hello,
the Advanced Monads page in the Haskell Wikibook
(http://en.wikibooks.org/wiki/Haskell/Advanced_monads) contains the
following
example of a List Monad
pythags = do
x - [1..]
y - [x..]
z - [y..]
On 2/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello,
the Advanced Monads page in the Haskell Wikibook
(http://en.wikibooks.org/wiki/Haskell/Advanced_monads) contains the
following
example of a List Monad
pythags = do
x - [1..]
y - [x..]
z - [y..]
guard
On Feb 12, 2007, at 11:02 AM, [EMAIL PROTECTED] wrote:
Hello,
the Advanced Monads page in the Haskell Wikibook
(http://en.wikibooks.org/wiki/Haskell/Advanced_monads) contains the
following
example of a List Monad
pythags = do
x - [1..]
y - [x..]
z - [y..]