Cats: Tuple Apply syntax fixes

Created on 7 Sep 2016  路  5Comments  路  Source: typelevel/cats

Referring to this syntax:

import cats.implicits._

(Option(2), Option(3)).map2(_ + _)
  • [ ] No Unapply
  • [ ] Should this be under cats.syntax.tuple as it currently is or cats.syntax.apply?
  • [ ] Deprecate/remove CartesianBuilder syntax

Most helpful comment

As noted by @non, mapN would be a nice name for this: https://gitter.im/typelevel/cats?at=582dd60269eb65323c45819c

All 5 comments

For (1), let's add it!
For (2) I think I'd prefer cats.syntax.apply but I don't feel super strongly if someone else disagrees.
For (3), yes.

As noted by @non, mapN would be a nice name for this: https://gitter.im/typelevel/cats?at=582dd60269eb65323c45819c

:+1: for mapN so that folks don't need to manually count the number of values.

for Unapply support I remember having tried without success a few month ago. You can see my code here.

@julienrf I think we can drop Unapply support now that we have SI-2712 fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexandru picture alexandru  路  4Comments

diesalbla picture diesalbla  路  4Comments

SimY4 picture SimY4  路  4Comments

LukaJCB picture LukaJCB  路  4Comments

mcanlas picture mcanlas  路  4Comments