
10 May
2014
10 May
'14
1:45 p.m.
Dear Alexander,
While we're having fun golfing, my attempt:
mapM_ (\(x, y) -> printf "%d %d\n" x y) $ [(n, n^2) | n <- [1..100]]
Nice, although I'm a bit perplexed as to why it typechecks without hints, whereas the following (which avoids the boxing/unboxing of pairs) does not: mapM_ (\n -> printf "%d %d" n (n^2)) [1..100] Peace, Stu