BAEL-7483 Improvement to Potential issue in Functional Programming in Java
This commit is contained in:
parent
c0756a59b7
commit
bf600c0e7b
|
@ -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