Hacker News new | past | comments | ask | show | jobs | submit login

   putStrLn =<< show . sum . take 3000000 . randomRs (0, 100::Int) `fmap` newStdGen
That is truly beautiful.



In Matlab:

   >> tic;sum(rand(1,3e6));toc
   Elapsed time is 0.059096 seconds.


If you want to play golf I bet J can beat that. Haskell is not a domain-specific language as Matlab is.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: