[Haskell-cafe] How to simplify the code of Maybe within a monad?
Тимофеев Никита Дмитриевич
ndtimofeev at gmail.com
Fri Aug 17 13:36:50 CEST 2012
On 17 августа 2012 11:48:54 Magicloud Magiclouds wrote:
> But how if here maybe[ABC] are like 'IO (Maybe Int)', or foo is type
> of 'Int -> IO Int'?
Maybe you can help monad transformers and MaybeT? They help you write code
like 'MaybeT f1 >> MaybeT f2 >> MaybeT f3 where { f1, f2, f3 :: IO (Maybe Int)
}'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120817/acd6dcc9/attachment.htm>
More information about the Haskell-Cafe
mailing list