Some FP in Java.