Created
February 21, 2017 14:23
-
-
Save hamishdickson/fcc166c34f23e66efa5174cbb1b34e66 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
/* | |
* here is a cool thing @Astrac did | |
* | |
* lifts `A => F[B]` to `F[A => B]`, where `F` has a Comonad and an applicative | |
*/ | |
def lift[F[_], A, B](f: A => F[B])(implicit cm: Comonad[F], ap: Applicative[F]): F[A => B] = ap.pure(a => f(a).extract) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment