-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Show[List] #601
Conversation
|
||
implicit def listShow[A:Show]: Show[List[A]] = | ||
new Show[List[A]] { | ||
def show(fa: List[A]): String = s"List(${fa.map(_.show).mkString(", ")})" |
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.
If you're already using mkString
: fa.map(_.show).mkString("List(", ", ", ")")
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.
Oh I forgot you could do that. Thanks will do.
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.
To save you a comment: I'll do that in the Set PR too :)
Thanks to @fthomas for the recommendation.
Current coverage is
|
👍 |
1 similar comment
👍 |
No description provided.