<br>Folks,<br><br>I have a simple type called Beverage and an example that allows me to construct Maybe Beverage types.<br><br>Here are some type signatures for example functions:<br><br>request :: String -> Maybe Beverage<br>
<br>addMalt :: Beverage -> Maybe Beverage<br><br>I have defined a chain function like so:<br><br>chain :: (Maybe a) -> (a -> Maybe b) -> (Maybe b)<br>chain = (>>=)<br><br>I can do this:<br><br>(chain (request "beer") addMalt)<br>
<br>and <br><br>request "beer" `chain` addMalt <br><br>I think I understand why, as I use the back-ticks for infix.<br><br>However, I don't have to do that for the true bind function, (>>=)<br><br>request "beer" >>= addMalt<br>
<br>I would like to use chain in this way -- that is without back-ticks. I'm not sure how...<br><br>Is there something I'm missing?<br clear="all"><br>thanks<br>Mike<br><br>ps. Thanks to everyone for the great discussion on IO (re: previous question)<br>
<br>-- <br>----------------------<br>Michael Easter<br><a href="http://codetojoy.blogspot.com">http://codetojoy.blogspot.com</a>: Putting the thrill back in blog<br><br><a href="http://youtube.com/ocitv">http://youtube.com/ocitv</a> -> Fun people doing serious software engineering<br>