Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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);
}
$ 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