These are chat archives for ramda/ramda
@GrosSacASac I should have been more explicit, but method 1 in the example avoids side effects, whereas method 2 relies on a side effect (assigning to an external variable) to achieve its goals.
I prefer to avoid modifying external variables from within a function (with some exceptions, like closures for private state). It works fine in small cases, but as a pattern it concerns me, as it leads to code that gets harder to reason about as your codebase grows. If you don't share my prejudices in that area, that's fine, I was just providing my reasoning for preferring method one.