question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistency between lensIndex/lensPath

See original GitHub issue

Just found this issue:

  R.view(R.lensIndex(-1), ['a','b','c']) // => 'c'
  R.view(R.lensPath([-1]), ['a','b','c']) // => undefined 

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
CrossEyecommented, Feb 21, 2017

Yes, I think that would make sense. I’ll try to look into it soon.

1reaction
scott-christophercommented, Feb 21, 2017

The only concern I have is if we change the implementation of lensPath to match lensIndex, then it will become inconsistent with the behaviour of path and assocPath.

Could we instead update the implementation of path and assocPath to support negative indexes?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found