Functional Programming 2 assignment 2