[Haskell-cafe] extending Do notation

Kim-Ee Yeoh ky3 at atamo.com
Tue May 20 20:02:45 UTC 2014


On Wed, May 21, 2014 at 2:47 AM, silvio <silvio.frischi at gmail.com> wrote:

> do print map (<-readFile) ["foo","bar"]


The closest current Haskell can come to this is

print =<< mapM readFile ["foo","bar"]

And I agree that the manual effect typing, the requisite =<< and the mapM
for map, can be a pain.

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140521/a8f9661b/attachment.html>


More information about the Haskell-Cafe mailing list