For Ramda, the difference between R.map() and R.forEach() is:
R.forEach()
returns the original array whereas R.map()
returns a
functor
R.forEach()
can only operate on array but R.map()
can also operate on an object (i.e. the key/value pairs of the object are treated
like an array)