Discrete Mathematics and Functional Programming