Closed whitelizard closed 2 years ago
This is some report. Thank you. I'll check all of your points and I'll get back to you.
REPL related issue is a bit low on priority, so I will not have a solution this week.
I am currently in a sick leave, but afterwards I will look into the issue.
Wrong execution of:
mapAsync
mapFastAsync
debounce
pipeAsync
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.
I will be closing the issue as I have fixed wrong result in R.mapAsync.
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.
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.
Ok well, I guess the docs just need to be synchronized then. The 'Async' type is referenced in 3 places.
Examples for async functions
mapAsync
mapFastAsync
debounce
pipeAsync
do not run as expected. Oftentimes it's just anasync
that is missing.Also found from running examples for many other of the functions (not all):
isType
for 'Async' type.partialCurry
is missingR.
in the example. Same forpiped
,replaceAll
,splitAt
,symmetricDifference
&remove
.path
seems to returnnull
instead ofundefined
. Same forprop
.pathOr
example is broken with syntax errors.paths
, and same problem as withpath
as well.props
.pick
does not match expected.pickAll
.pluck
,split
,set
,reject
,subtract
&produce
.propIs
&slice
.removeIndex
function is broken?sortByProps
is usingsortByPath
!On another note:
sort
andsortBy
difference should be better clarified I think.