selfrefactor / rambdax

Extended version of Rambda
https://selfrefactor.github.io/rambdax
MIT License
221 stars 26 forks source link

"take" is not work as expected #41

Closed makarkotlov closed 4 years ago

makarkotlov commented 4 years ago

That image will show image instead of image

selfrefactor commented 4 years ago

This is how Ramda behaves as you can see here: https://ramdajs.com/repl/#?R.take%281%2C%20%5B%5B%201%2C%202%2C%203%20%5D%5D%29

makarkotlov commented 4 years ago

This is how Ramda behaves as you can see here: https://ramdajs.com/repl/#?R.take%281%2C%20%5B%5B%201%2C%202%2C%203%20%5D%5D%29

Thank you, but do you think that this is the right behavior?

selfrefactor commented 4 years ago

The latest major bump of Rambda was exactly to close as possible the difference in methods - https://github.com/selfrefactor/rambda/issues/276

All the failing Ramda tests are displayed in Ramda readme witch click upon this test Expand to see allRamdatests failing forRambda, if you want to know in detail the difference between the two libraries.

Moreover, all of those failing tests are kept in https://github.com/selfrefactor/rambda/tree/master/files/failing_ramda_tests folder.

If Ramda change its behavior, then I will follow suit, but for now this is how it is.

I try to enhance Ramda rather than change existing behavior - for example R.filter in Rambda supports objects, while Ramda work only with arrays. Or introducing more return types from R.type.

At some point, Idecide not to match Ramda functionality, but that is exception, rather than a rule. I will close the issue, but feel free to comment further.