selfrefactor / rambdax

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

Broken examples #68

Closed whitelizard closed 2 years ago

whitelizard commented 3 years ago

Examples for async functions

Also found from running examples for many other of the functions (not all):

On another note: sort and sortBy difference should be better clarified I think.

selfrefactor commented 3 years ago

This is some report. Thank you. I'll check all of your points and I'll get back to you.

selfrefactor commented 3 years ago

REPL related issue is a bit low on priority, so I will not have a solution this week.

selfrefactor commented 3 years ago

I am currently in a sick leave, but afterwards I will look into the issue.

selfrefactor commented 2 years ago

Wrong execution of:

This is ongoing issue and I will report back

Something deeper is wrong with isType for 'Async' type.

I will need more info on that one as I see nothing wrong.

partialCurry is missing R. in the example. Same for piped, replaceAll, splitAt, symmetricDifference & remove.

Fixed

path seems to return null instead of undefined. Same for prop.

Fixed

pathOr example is broken with syntax errors.

Fixed

Logical error in example for paths, and same problem as with path as well.

Fixed

pick does not match expected. Neither does pickAll.

Fixed

Syntax error for pluck , split, set, reject, subtract & produce.

Fixed

Logic error for propIs & slice.

Fixed

removeIndex function is broken

It doesn't look broken to me. Do you care to provide more info on that one?

sortByProps is using sortByPath!

Fixed

sort and sortBy difference should be better clarified I think.

Fixed, but it is waiting a release

On side note, I notice several underlying issues in Rambda REPL and I will try to fix them. Again, thank you for the detailed issue; it was very helpful.

selfrefactor commented 2 years ago

I will be closing the issue as I have fixed wrong result in R.mapAsync.

whitelizard commented 2 years ago

To clarify

Something deeper is wrong with isType for 'Async' type.

The example and REPL isn't working. In the implementation, nothing takes any 'Async' type into account. The tests don't test for it.

selfrefactor commented 2 years ago

I added more tests for R.isType with this commit: https://github.com/selfrefactor/rambda/commit/5cf83c55a615648a6d86355f318d72aefeb09ee3

Indeed, there is issue with why type of R.delay(100) is Promise instead of Async, but was how it always has been.

R.isType is using R.type so any issue in R.isType is in fact issue with R.type. I would consider having one type for asynchronous functions as having both Promise and Async is confusing.

whitelizard commented 2 years ago

Ok well, I guess the docs just need to be synchronized then. The 'Async' type is referenced in 3 places.