package class9_1_JavaFXAndFunctionalProgramming;// Dr. Yoder. MSOE. 07 February 2017 import java.util.function.Function; import java.util.function.Predicate; public class PureFunctional { public static void main(String[] args) { // Homework: Fill in this blank. Then uncomment the lines // below to see if it prints -1. // SimpleFunction cos = new SimpleFunction() { // @Override // public double function(double argument) { // return Math.cos(argument); // } // }; Function cos = theta -> Math.cos(theta); System.out.println("cos(pi) = " + cos.apply(Math.PI)); Predicate biggerThanHalf = x -> x > 0.5; System.out.println("biggerThanHalf.test(0.6) = " + biggerThanHalf.test(0.6)); System.out.println("biggerThanHalf.test(0.3) = " + biggerThanHalf.test(0.3)); } } //public interface SimpleFunction { // double function(double argument); //}