Created
June 4, 2019 10:03
-
-
Save mmenestret/bcd535c9a84c33d627786d1279f6311d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implicit class InfixMappable[A, B, C](f: A => B) { | |
def `<$>`[G[_]: Functor](ga: G[A]): G[B] = Functor[G].map(ga)(f) | |
} | |
val ap1: Option[Int] = ??? | |
val ap2: Option[Int] = ??? | |
val ap3: Option[Int] = ??? | |
val f: Int => Int => Int => Int = ??? | |
f `<$>` ap1 ap ap2 ap ap3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment