begin functional programming chapter