[Haskell-cafe] loop problem
Stuart A. Kurtz
stuart at cs.uchicago.edu
Sat May 10 18:09:54 UTC 2014
Dear Alexander,
On May 10, 2014, at 12:49 PM, Alexander Berntsen <alexander at plaimi.net> wrote:
> ? mapM_ (\n -> printf "%d %d" n (n^2)) [1..100]
> 1 12 43 94 165 256 367 498 649 8110 10011 12112 14413 16914 19615 22516
> 25617 28918 32419 36120 40021 44122 48423 52924 57625 62526 67627 72928
> 78429 84130 90031 96132 102433 108934 115635 122536 129637 136938 144439
> 152140 160041 168142 176443 184944 193645 202546 211647 220948 230449
> 240150 250051 260152 270453 280954 291655 302556 313657 324958 336459
> 348160 360061 372162 384463 396964 409665 422566 435667 448968 462469
> 476170 490071 504172 518473 532974 547675 562576 577677 592978 608479
> 624180 640081 656182 672483 688984 705685 722586 739687 756988 774489
> 792190 810091 828192 846493 864994 883695 902596 921697 940998 960499
> 9801100 10000
Yeah, it is better with the \n ;-).
Peace,
Stu
More information about the Haskell-Cafe
mailing list