Created
October 4, 2015 17:18
-
-
Save cocoatomo/46802b41659e9055bd57 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
package co.coatomo.math.categorical.typeclass.functor; | |
import java.util.function.Function; | |
interface FailedFunctor<A> { | |
<F extends FailedFunctor, B> F<B> map(Function<A, B> morphism); | |
} |
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
$ javac -d /tmp co/coatomo/math/categorical/typeclass/functor/FailedFunctor.java | |
co/coatomo/math/categorical/typeclass/functor/FailedFunctor.java:7: error: unexpected type | |
<F extends FailedFunctor, B> F<B> map(Function<A, B> morphism); | |
^ | |
required: class | |
found: type parameter F | |
where F is a type-variable: | |
F extends FailedFunctor declared in method map | |
1 error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment