[Haskell-beginners] Maybe perform an action

Tim Baumgartner baumgartner.tim at googlemail.com
Sun Dec 5 12:49:10 CET 2010


Hi Michael!

Ouch, I really should have some more looks at the standard libraries. Thanks!

Tim

> I often times do this as
>
> maybe (return ())
>
> If you want the exact same type signature, you just need to flip it:
>
> flip (maybe $ return ())
>
> Michael
>



More information about the Beginners mailing list