A monad with failure computation having an error message. An instance m of MonadFail must satisfy the following laws:
m
MonadFail
e
f
m.flatMap(f)(m.fail(e))
m.fail(e)
Readonly
Applies the function to the value over S.
S
The wrapped function.
The value got by evaluating fn.
fn
Maps the function fn onto F structure.
F
The function to be mapped.
The mapped function.
A monad with failure computation having an error message. An instance
mofMonadFailmust satisfy the following laws:eandf;m.flatMap(f)(m.fail(e))equals tom.fail(e).