[Haskell-beginners] how to skip pattern match error when applying a mapM_

Daniel Trstenjak daniel.trstenjak at gmail.com
Tue Jan 17 21:28:47 UTC 2017


> thanks and what is the purpose of 
> 
> fail _ = nothing

’fail’ is called for pattern match errors, pretty much the error you’ve got from ’Just x <- ...’.
The IO Monad instance raises the exception you've seen.
For the Maybe Monad instance just 'Nothing' is returned.

Greetings,
Daniel


More information about the Beginners mailing list