Inconsistency between lensIndex/lensPath
See original GitHub issueJust found this issue:
R.view(R.lensIndex(-1), ['a','b','c']) // => 'c'
R.view(R.lensPath([-1]), ['a','b','c']) // => undefined
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, I think that would make sense. I’ll try to look into it soon.
The only concern I have is if we change the implementation of
lensPath
to matchlensIndex
, then it will become inconsistent with the behaviour ofpath
andassocPath
.Could we instead update the implementation of
path
andassocPath
to support negative indexes?