Created
October 24, 2014 12:08
-
-
Save noelwelsh/f20d6235d086efac0fc7 to your computer and use it in GitHub Desktop.
This file contains 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
import scalaz.{Functor, Monad} | |
import scalaz.std.option._ | |
import scalaz.syntax.monad._ | |
import scalaz.syntax.functor._ | |
object SyntaxExamples { | |
// This works fine | |
Monad[Option].lift((x: Int) => x + 1) | |
// could not find implicit value for parameter F: scalaz.Functor[F] | |
((x: Int) => x + 1).lift | |
// polymorphic expression cannot be instantiated to expected type; | |
// found : [A, B](fa: Option[A])(f: A => B)Option[B] | |
// required: scalaz.Functor[F] | |
((x: Int) => x + 1).lift(Functor[Option]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment