Playing with functional ideas in Java