In Haskell we say...

From this interesting blog post:

Where in C++ we might say:
  for (int x = 0; x < 10; x++) f(x)
in Haskell we would say:
  map f (take (10 [0..]))

Which is sadly all too often true. I'm definitely one of the ones who will tend not to find the much happier

map f [0..9]

Friend of Bart

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.
Syndicate content