HW 4: Functional Programming Style