3 ms·
The lodash one might be inspired by the Python itertools "partition" recipe, https://docs.python.org/3/library/itertools.html#itertools-recipes https://docs.pyt
by jacobolus 7y ago
The lodash one might be inspired by the Python itertools "partition" recipe, https://docs.python.org/3/library/itertools.html#itertools-recipes https://docs.python.org/3/library/itertools.html#itertools-r...
TFA’s inlined reduce version is much less readable than calling a function which wraps this behavior up.
- seanwilson 7y agoIt's common in functional programming libraries too, usually with the same name. See e.g. OCaml, Haskell and Standard ML.