Skip to content
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

Either.mapLeft Javadoc seems incorrect #1670

Closed
asarkar opened this issue Nov 11, 2016 · 5 comments
Closed

Either.mapLeft Javadoc seems incorrect #1670

asarkar opened this issue Nov 11, 2016 · 5 comments

Comments

@asarkar
Copy link

asarkar commented Nov 11, 2016

v2.0.4 Either.mapLeft says:

default Either<U,R> mapLeft(Function<? super L,? extends U> leftMapper)
Maps this right-biased Either.

Shouldn't it be "Maps this left-based Either"?

@danieldietrich danieldietrich added this to the 2.0.5 milestone Nov 11, 2016
@danieldietrich
Copy link
Contributor

Thank you. You are right, it is unclear. It is correct that the Either is right-biased, regardless if its left value or its right value is mapped. I will change the docs like this:

"Maps the left value of this Either, if present."

@asarkar
Copy link
Author

asarkar commented Nov 12, 2016

@danieldietrich Thank you. I suggest that you also explicitly say "...is a no-op if the value is a Right", or something to that effect. And at the same time, a similar phrase could be added to the map too.

@danieldietrich
Copy link
Contributor

Yes, the javadoc could be more mature throughout the project. We currently focus on the work of the other issues towards the bugfix release 2.0.5 and the next minor release 2.1.0.

Contributions, especially to javadoc, are welcome!

@asarkar
Copy link
Author

asarkar commented Nov 12, 2016

I'd be happy to but do you really need contribution to add 35 characters? Perhaps 70, if map is updated as well.

@danieldietrich
Copy link
Contributor

Of course not.

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

No branches or pull requests

2 participants