Currying in Java (and partial application of function example)