为什么 Functor[A => ?] 不能在 Scala 2.11.7 中编译?

Why does Functor[A => ?] not compile in Scala 2.11.7?

我正在关注 Michael Pilquist's excellent intro to Functors 并且我的 Scala 2.11.7 repl 无法编译(解释?)以下行。

implicit def function1Functor[X]: Functor[X => ?] = new Functor[X => ?] {
    def map[A, B](fa: X => A)(f: A => B): X => B = fa andThen f
}

[X => ?] 合法的 Scala 吗?

我看到他正在文件顶部导入他自己的模拟项目,但我无法确定它是否相关。

你需要那种投影仪编译器插件。 https://github.com/non/kind-projector