These are chat archives for ramda/ramda
|analogue in Ramda? I want to
R.headas the accumulator value and
R.tailas the list to iterate over.
fold1? and I believe it was removed at some point because there isn't a good generic way to handle the empty list.
foldl1:) and yeh, it look like it doesn't exist - discussion was here ramda/ramda#20
convergeis analogous to Erlang's
fold1does not exist, is because Ramda would have to make assumptions about what type the function should return when the list is empty.
headit felt natural, since the decision is delegated to the language:
 === undefined
head [1..]as an example from haskell. it will evaluate to 1 despite
[1..]representing an infinite list
someFunc(a + b)in JS first adds the values of
bthen supplies that result as the parameter to
someFunc. The equivalent in Haskell doesn't do that. If the function called never uses that value, it never performs the addition.