add exercise: functional linked lists in java