(String[] args)
| 6 | |
| 7 | public class CurriedIntAdd { |
| 8 | public static void main(String[] args) { |
| 9 | IntFunction<IntUnaryOperator> |
| 10 | curriedIntAdd = a -> b -> a + b; |
| 11 | IntUnaryOperator add4 = curriedIntAdd.apply(4); |
| 12 | System.out.println(add4.applyAsInt(5)); |
| 13 | } |
| 14 | } |
| 15 | /* Output: |
| 16 | 9 |