Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mention tupled syntax, a Cats workhorse that deserves to be more well known #4269

Merged
merged 3 commits into from
Jul 13, 2022

Conversation

benhutchison
Copy link
Member

In my experiences working with Cats users, awareness of tupled and parTupled is not high, considering how fundamental and useful these operations are. Attempt to raise the exposure plus a bit of relevant cross-linking in the docs.

Thank you for contributing to Cats!

This is a kind reminder to run sbt +prePR and commit the changed files, if any, before submitting.

val optPair: Option[(String, String)] = (username, password).tupled
```

(See also: variant `parTupled`, useful for composing tuples of executable tasks (eg `IO` from [Cats Effect](https://typelevel.org/cats-effect/docs/concepts#concurrent)) into a single task to run in [parallel](parallel.md))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can also say without parTupled, then an effect would execute from left to right.

Maybe also it could be worthwhile to mention mapN and parMapN at the same time since they are quite similar.

@armanbilge armanbilge added this to the 2.9.0 milestone Jul 12, 2022
@benhutchison benhutchison requested a review from johnynek July 13, 2022 12:29
johnynek
johnynek previously approved these changes Jul 13, 2022
Copy link
Contributor

@johnynek johnynek left a comment

Choose a reason for hiding this comment

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

Thanks!

Co-authored-by: Arman Bilge <armanbilge@gmail.com>
@benhutchison benhutchison requested a review from armanbilge July 13, 2022 18:33
@armanbilge armanbilge merged commit f8f6eff into typelevel:main Jul 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants