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

Add Show[List] #601

Merged
merged 2 commits into from
Nov 8, 2015
Merged

Add Show[List] #601

merged 2 commits into from
Nov 8, 2015

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Nov 6, 2015

No description provided.


implicit def listShow[A:Show]: Show[List[A]] =
new Show[List[A]] {
def show(fa: List[A]): String = s"List(${fa.map(_.show).mkString(", ")})"
Copy link
Member

Choose a reason for hiding this comment

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

If you're already using mkString: fa.map(_.show).mkString("List(", ", ", ")")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I forgot you could do that. Thanks will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To save you a comment: I'll do that in the Set PR too :)

Thanks to @fthomas for the recommendation.
@codecov-io
Copy link

Current coverage is 76.36%

Merging #601 into master will increase coverage by +0.07% as of 4ee8684

@@            master    #601   diff @@
======================================
  Files          160     160       
  Stmts         2194    2196     +2
  Branches        68      68       
  Methods          0       0       
======================================
+ Hit           1674    1677     +3
  Partial          0       0       
+ Missed         520     519     -1

Review entire Coverage Diff as of 4ee8684

Powered by Codecov. Updated on successful CI builds.

@mpilquist
Copy link
Member

👍

1 similar comment
@adelbertc
Copy link
Contributor

👍

adelbertc added a commit that referenced this pull request Nov 8, 2015
@adelbertc adelbertc merged commit 97a52dd into typelevel:master Nov 8, 2015
@ceedubs ceedubs deleted the list-show branch November 15, 2015 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants