@
bramblex 这不简单。。。
```
public interface Func1<T, TResult> {
public TResult call(T arg1);
}
```
```
Func1<Integer, Func1<Integer, Integer>> add
= new Func1<Integer, Func1<Integer, Integer>>(){
@
Override public Func1<Integer, Integer> call(final Integer a) {
return new Func1<Integer, Integer>(){
@
Override public Integer call(Integer b) {
return a + b;
}
};
}
};
System.out.println(add.call(1).call(2)); //3
Func1<Integer, Integer> add2 = add.call(2);
System.out.println(add2.call(1)); //3
```