Normal
Es geht auch ohne dieses nervige Interface...[code=java] public static Function<Integer, Function<Integer, Function>> myTriFunction = x -> y -> f -> y == 0 ? 1 : x * (Integer) ((Function<Integer, Function<Integer, Function>>) f).apply(x).apply(y - 1).apply(f); public static BiFunction<Integer, Integer, Integer> myBiFunction = (x, y) -> (Integer) myTriFunction.apply(x).apply(y).apply(myTriFunction);[/code][code=java] System.out.println(myBiFunction.apply(3, 5));[/code]243
Es geht auch ohne dieses nervige Interface...
[code=java] public static Function<Integer, Function<Integer, Function>> myTriFunction =
x -> y -> f -> y == 0 ? 1 : x * (Integer) ((Function<Integer, Function<Integer, Function>>) f).apply(x).apply(y - 1).apply(f);
public static BiFunction<Integer, Integer, Integer> myBiFunction =
(x, y) -> (Integer) myTriFunction.apply(x).apply(y).apply(myTriFunction);[/code]
[code=java] System.out.println(myBiFunction.apply(3, 5));[/code]
243