[Haskell-beginners] general structuring of "foreach" logic in IO

Brandon Allbery allbery.b at gmail.com
Mon Apr 14 15:47:40 UTC 2014


On Mon, Apr 14, 2014 at 11:41 AM, John M. Dlugosz
<ngnr63q02 at sneakemail.com>wrote:

> (And that begs the question of why getArgs needs to be monadic in the
> first place.  It doesn't change its value; it's a strict constant at
> run-time, and not knowing it at compile time is my problem how?)


But it is the *compiler's* problem. "Constant" means "known at compile
time" to the compiler.

Although I wonder if you'd be happier with getArgs >>= mapM_ (do ...).

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140414/52d31327/attachment.html>


More information about the Beginners mailing list