[erlang-questions] Erlang again!
Thu Jul 22 19:08:47 CEST 2010
On 2010-07-22, at 18:55 , Boris Mühmer wrote:
> Is such a solution plain bad, or just a newbie mistake/error?
I would say it's a not-very-useful reimplementation of something which already exists in the stdlib. It's mostly a question of not knowing your toolbox, so I wouldn't say it's bad, but it definitely isn't optimum.
On the other hand, the Erlang toolbox isn't very discoverable/searchable so you have to read it all (several time if needed).
That's a big advantage of haskell and its strong typing: hoogle lets you search functions by type. In this case you can search for [a] -> [b] -> [c] (a function taking a list of 'a's, a list of 'b's and returning a list of 'c's) and the first result is zipWith.
It's not perfect though, as a search for [Int] -> [Int] -> [Int] demonstrates with zipWith ending up on the third page of the results, and the return of such functions as `drop :: Int -> [a] -> [a]`.
More information about the erlang-questions