double taxRate = 0.09; Function<Double, Double> addTax = price -> price + price * taxRate; ... taxRate = 0.13;
- Chapter 2. Using functions in Java
- from Functional Programming in Java: How functional techniques improve your Java programs
- Publisher: Manning Publications
- Released: January 2017
method variables need to be implicitly final if used within the Fn inside a method.
Share this highlighthttp://www.safaribooksonline.com/a/functional-programming-in/20218741/