-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slight tweak to Lens.root doc #7
Conversation
@@ -17,12 +17,14 @@ defmodule Lens do | |||
end | |||
|
|||
@doc ~S""" | |||
Returns a lens that focuses on the whole data. | |||
Returns a lens that focuses on all of the data in the given scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like this "scope" - I don't think there is a mention of "scope" anywhere else in the doc. "all of the" vs. "the whole" is a good change, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But "all of the data" by itself is no less confusing. The problem which confused me was exactly that it wasn't all of the data (which would have been the the root
of the whole data structure), but rather the subtree that is currently focused on.
Do you have a suggestion for a better wording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
Returns a lens that yields the entirety of the data currently under focus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns a lens that yields the entirety of the data currently under focus.
This sounds good to me. Does it address the problem you have? You could also split it into 2 sentences, one saying the general "all the data" thing and the other describing the behaviour in a chain of lenses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that would have solved my problem.
Ready for re-review |
I am not fully convinced about the wording here... couldn't really decide what would be most useful when I sat down to improve the wording. I hope the additional example would have helped former me.