[Haskell-beginners] is this right?

Dennis Raddle dennis.raddle at gmail.com
Thu Sep 22 09:57:17 UTC 2016


I want to evaluate a function on a series of inputs:

f :: a -> Maybe b

then collect the results [b] if they are all Just, or terminate the
computation immediately upon hitting Nothing.

This is exactly what mapM does in the Maybe monad, correct?

In particular I want to make sure that it will not try to evaluate anything
past the first 'Nothing' result as the efficiency of my design is based on
that.

D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160922/3d0dfb99/attachment.html>


More information about the Beginners mailing list