Thank you that is very interesting... this is really impressive with haskell that it's so "easy" to add such operators, that they don't need to be builtin.<br><br>Thanks for your time, it was not wasted!<br>
<br><div class="gmail_quote">On Wed, Oct 31, 2012 at 6:26 PM, Daniel Trstenjak <span dir="ltr"><<a href="mailto:daniel.trstenjak@gmail.com" target="_blank">daniel.trstenjak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On Wed, Oct 31, 2012 at 06:14:52PM +0100, Daniel Trstenjak wrote:<br>
> (<&&>) :: Monad m => m Bool -> m Bool -> m Bool<br>
> (<&&>) m1 m2 = do<br>
> r1 <- m1<br>
> if r1 then m2 else return False<br>
><br>
><br>
> (<||>) :: Monad m => m Bool -> m Bool -> m Bool<br>
> (<||>) m1 m2 = do<br>
> r1 <- m1<br>
> if r1 then return True else m2<br>
<br>
</div>That the operators behave like the boolean ones we should have the same fixity declarations:<br>
<br>
infixr 3 (<&&>)<br>
infixr 2 (<||>)<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Greetings,<br>
Daniel<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br>