Java F-Bound types with generics
问题 Is there any way to express f-bound types in java where at the call site, a generic response is returned? interface Functor<T extends Functor<T>> public <B> T<B> map(Function<A, B> fn); // won't compile because types don't match I can use f-bound types if the type never changes, but in the case of map, I need a new type. Is there a way to express this in java? What I am really looking for is any way that I can get something like higher kinds even though I know javac doesn't support higher