Functional Programming book examples