[Haskell-cafe] extending Do notation
Kim-Ee Yeoh
ky3 at atamo.com
Tue May 20 13:29:55 UTC 2014
On Tue, May 20, 2014 at 7:58 PM, silvio <silvio.frischi at gmail.com> wrote:
> I don't know how often i've seen this one
> ... >>= flip ...
> when really we it should have been
> ... {...}
>
Your email is on the assertion-heavy side. Would you reconsider restating
your case?
Just to take a small slice, instead of
> getExecutablePath = _NSGetExecutablePath >>= realpath
you'd prefer to use braces like this:
> getExecutablePath = _do realpath { _NSGetExecutablePath }
You could already write in today's haskell:
> getExecutablePath = realpath =<< _NSGetExecutablePath
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140520/39079980/attachment.html>
More information about the Haskell-Cafe
mailing list