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 Tuple2 Example for Bifunctor #2566

Merged
merged 5 commits into from
Oct 23, 2018

Conversation

stephen-lazaro
Copy link
Contributor

@stephen-lazaro stephen-lazaro commented Oct 18, 2018

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

@@ -79,6 +79,9 @@ options:
url: typeclasses/invariantmonoidal.html
menu_section: variance

- title: Bifunctor
url: typeclasses/bifunctor.html
menu_type: typeclasses
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh good catch!

@codecov-io
Copy link

codecov-io commented Oct 18, 2018

Codecov Report

Merging #2566 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

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

kailuowang
kailuowang previously approved these changes Oct 19, 2018
Copy link
Contributor

@ceedubs ceedubs left a 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 bimaping 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 aList` 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh good catch!

@stephen-lazaro
Copy link
Contributor Author

Sure! I'll simplify and try to get something less complicated.

@stephen-lazaro
Copy link
Contributor Author

@ceedubs How's that?

ceedubs
ceedubs previously approved these changes Oct 20, 2018
Copy link
Contributor

@ceedubs ceedubs left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@LukaJCB LukaJCB left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@LukaJCB LukaJCB merged commit 4575588 into typelevel:master Oct 23, 2018
@kailuowang kailuowang added this to the 1.5 milestone Oct 30, 2018
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.

Add Tuple2 as example of Bifunctor
5 participants