2008-01-26 16:50 in /tech/haskell
Recently, Reg Braithwaite wrote about Object#andand, a method for chaining computations that can fail. It’s not clear from his post if he realizes it (maybe he considers it a completely uninteresting observation), but he’s become the latest person to reinvent monads. In Haskell, his proposed
&&.operator is spelled
>>=(and is significantly more general, as he’s really only created the
(Although I originally claimed the second half had no similar connection, after thinking about it more, I now retract that. Haskell’s
>>operator chains two computations, ignoring the result of the first; in essence performing it just for the “side effects”.
returninghave a similar flavor, although they permit a far wider class of side effects.)