exercism / erlang

Exercism exercises in Erlang.
https://exercism.org/tracks/erlang
MIT License
127 stars 89 forks source link

The `accumulate` problem uses inaccurate terminology #556

Closed hjiang closed 10 months ago

hjiang commented 10 months ago

The accumulate problem asks for a function of type:

(fun((A) -> B), list(A)) -> list(B)

In most languages accumulate has the type:

(fun((A, B) -> A), A, list(B)) -> A

Perhaps calling it map would be more appropriate?

NobbZ commented 10 months ago

The name of the function is taken from the canonical data, and it has been point of discussion there a couple of times in public and private discussion channels.

Yes, accumulate is just map.