Skip to content
This repository has been archived by the owner on Mar 3, 2018. It is now read-only.

Prefer R.prop over R.path with a single path element #2

Open
c089 opened this issue Dec 7, 2015 · 4 comments
Open

Prefer R.prop over R.path with a single path element #2

c089 opened this issue Dec 7, 2015 · 4 comments

Comments

@c089
Copy link

c089 commented Dec 7, 2015

I think R.path(['x'], x) === R.prop('x', x) should hold in all or at least most cases (didn't write a property-tests though, so not 100% sure).

@lo1tuma
Copy link
Owner

lo1tuma commented Dec 7, 2015

I thought about the same, unfortunately R.prop and R.path (when path.length === 1) are not equivalent, have a look at this upstream issue for more information about that.

@c089
Copy link
Author

c089 commented Dec 7, 2015

Oh yeah now you mention it I think we even talked about this before...

@davidchambers
Copy link

I just opened ramda/ramda#1538 to address this inconsistency.

@lo1tuma
Copy link
Owner

lo1tuma commented Dec 9, 2015

Awesome, thanks @davidchambers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants