`partition` is caching values.
xgbuils opened this issue · 1 comments
xgbuils commented
Hi @benji6
I was reading partition
implementation and it is implemented breaking your idea about not caching values.
I propose use filter
for the implementation:
module.exports.partition = curry((f, xs) => genToIter(function * () {
yield filter(f, xs)
yield filter(x => !f(x), xs)
}))
Cheers!
benji6 commented
Very true! I think I was being very lazy when I wrote that code! Will push a fix :)