putStrLn =<< show . sum . take 3000000 . randomRs (0, 100::Int) `fmap` newStdGen
>> tic;sum(rand(1,3e6));toc Elapsed time is 0.059096 seconds.