//DoubleDoubleFunction f = F.chain(F.plus,F.identity,F.identity);
DoubleDoubleFunction f = F.chain(F.abs,F.chain(F.plus,F.sin,F.chain(F.square,F.cos)));
//DoubleDoubleFunction f = F.chain(F.plus,F.sin,F.chain(F.square,F.cos));
//DoubleDoubleFunction f = F.plus;
System.out.println(f.apply(a,b));
DoubleDoubleFunction g = new DoubleDoubleFunction() {
public final double apply(double x, double y) { return Math.abs(Math.sin(x) + Math.pow(Math.cos(y),2)); }
//public final double apply(double x, double y) { return x+y; }
};
System.out.println(g.apply(a,b));