|
|
|
|
|
by glassx
5100 days ago
|
|
Well, to nitpick, the first, fourth and fifth example are just variations of the other ones, and they're (ab)using Haskell features - respectively n+k patterns, laziness and point-free programming. Those features aren't available on every functional language, and they're not really used indiscriminately as shown here on most Haskell code bases, so yeah, I maintain that this page is a terrible example (albeit a very educational and fun one). Here's a Python version, showing that even on an imperative language there's a lot of ways of doing the same things: https://gist.github.com/289467 |
|
Where as in an imperative language often learning the syntax is enough to get the ball rolling.