Lab 2 for Introduction to functional programming