Java generics: How to encode a Functor interface in Java?

后端 未结 5 701
庸人自扰
庸人自扰 2021-02-01 22:00

I want to define a Functor class in Java. This works:

//a Function
public interface F {
   public R apply(A a);
}

public interface Functor {         


        
5条回答
提交回复
热议问题