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

added leftNel and rightNel syntax #2146

Merged
merged 3 commits into from
Jan 13, 2018

Conversation

kailuowang
Copy link
Contributor

since EitherNel is a lot more useful with the Parallel TC

@kailuowang kailuowang added this to the 1.1 milestone Jan 10, 2018
LukaJCB
LukaJCB previously approved these changes Jan 10, 2018
* For example:
* {{{
* scala> import cats.implicits._, cats.data.NonEmptyList
* scala> "Err".leftNel[Int]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace error on the end of this line

* For example:
* {{{
* scala> import cats.implicits._, cats.data.NonEmptyList
* scala> 1.rightNel[String]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line also has an extra space

LukaJCB
LukaJCB previously approved these changes Jan 10, 2018
@codecov-io
Copy link

codecov-io commented Jan 10, 2018

Codecov Report

Merging #2146 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2146      +/-   ##
==========================================
+ Coverage   94.66%   94.67%   +<.01%     
==========================================
  Files         328      328              
  Lines        5533     5538       +5     
  Branches      199      199              
==========================================
+ Hits         5238     5243       +5     
  Misses        295      295
Impacted Files Coverage Δ
core/src/main/scala/cats/syntax/either.scala 99.15% <100%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a04fff...892c8fc. Read the comment docs.

peterneyens
peterneyens previously approved these changes Jan 12, 2018
* res0: Either[NonEmptyList[String], Int] = Left(NonEmptyList(Err))
* }}}
*/
def leftNel[B]: Either[NonEmptyList[A], B] = Left(NonEmptyList.of(obj))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use NonEmptyList.one here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @peterneyens addressed.

@kailuowang kailuowang dismissed stale reviews from peterneyens and LukaJCB via 892c8fc January 12, 2018 17:36
@kailuowang kailuowang merged commit 7e6336f into typelevel:master Jan 13, 2018
@kailuowang kailuowang deleted the newEitherSyntax branch January 13, 2018 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants