Merge pull request #15919 from thibaultfaure/improvement/BAEL-7483-Issue-in-Functional-Programming-in-Java
BAEL-7483 Improvement to Potential issue in Functional Programming in…
This commit is contained in:
commit
4bd7728ecf
|
@ -4,7 +4,7 @@ import java.util.function.Function;
|
|||
|
||||
public class Currying {
|
||||
|
||||
private static Function<Double, Function<Double, Double>> weight = mass -> gravity -> mass * gravity;
|
||||
private static Function<Double, Function<Double, Double>> weight = gravity -> mass -> mass * gravity;
|
||||
|
||||
private static Function<Double, Double> weightOnEarth = weight.apply(9.81);
|
||||
|
||||
|
|
Loading…
Reference in New Issue