[Haskell-cafe] loop problem
allbery.b at gmail.com
Sat May 10 17:59:14 UTC 2014
On Sat, May 10, 2014 at 1:49 PM, Alexander Berntsen <alexander at plaimi.net>wrote:
> But if I chuck it in a source file and attempt to runhaskell or compile
> it, this fails with a very nasty error. Oh, what fun! To make it work ni
> a source file, you need a type signature in there somewhere. E.g.:
> main = mapM_ (\n -> printf "%d %d" (n :: Int) (n^2)) [1..100]
> This works fine. This is indeed interesting! Someone care to
> additionally make it enlightening as well?
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...
More information about the Haskell-Cafe