-
-
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 Tuple2 Example for Bifunctor #2566
Conversation
@@ -79,6 +79,9 @@ options: | |||
url: typeclasses/invariantmonoidal.html | |||
menu_section: variance | |||
|
|||
- title: Bifunctor | |||
url: typeclasses/bifunctor.html | |||
menu_type: typeclasses |
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.
Noticed this link was missing, unsure if intentional.
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 good catch!
Codecov Report
@@ Coverage Diff @@
## master #2566 +/- ##
=======================================
Coverage 95.14% 95.14%
=======================================
Files 361 361
Lines 6630 6630
Branches 289 289
=======================================
Hits 6308 6308
Misses 322 322 Continue to review full report at Codecov.
|
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.
Thanks, @stephen-lazaro!
If I'm reading correctly, this example seems to be doing a few things that are orthogonal to bimap
ing on tuples. Putting the records into separate lists and then zipping them, parsing strings into Either
, and having a list of values as opposed to a single tuple seem to distract from the Bifunctor
usage to me. What do you think about using a smaller example with a simple (A, B) =>
(C, D)transformation? Or potentially still mapping over a
List` but without the zipping and parsing?
@@ -79,6 +79,9 @@ options: | |||
url: typeclasses/invariantmonoidal.html | |||
menu_section: variance | |||
|
|||
- title: Bifunctor | |||
url: typeclasses/bifunctor.html | |||
menu_type: typeclasses |
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 good catch!
Sure! I'll simplify and try to get something less complicated. |
@ceedubs How's that? |
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.
Thanks!
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.
Looks great, thanks!
The example is certainly a bit contrived, but I do think it gets the general point across. Very open to feedback.
Intended to resolve #2530