This book provides a distinct way to teach discrete mathematics. Since discrete mathematics is crucial for rigorous study in computer science, many texts include applications of mathematical topics to computer science or have selected topics of particular interest to computer science. This text fully integrates discrete mathematics with programming and other foundational ideas in computer science. In fact, this text serves not only the purpose of teaching discrete math. It is also an introduction to programming, although a non-traditional one. Functional programming is a paradigm in which the primary language construct is the function and function here is essentially the same as what it is in mathematics. In the functional paradigm we conceive the program as a collection of composed functions, as opposed to a sequence of instructions (in the imperative paradigm) or a set of interacting objects (in the object-oriented paradigm). Dominant computer science curricula emphasize object-oriented and imperative programming, but competence in all paradigms is important for serious programmers and functional programming in particular may be appropriate for many casual programmers, too. For our purposes, the concepts underlying functional programming are especially grounded in those of discrete mathematics. Discrete mathematics and functional programming are equal partners in this endeavor, with the programming topics giving concrete applications and illustrations of the mathematical topics, and the mathematics providing the scaolding for explaining the programming concepts. The two work together in mutual illumination.
I’m still working through Discrete Mathematics and Functional Programming by Thomas VanDrunen, but so far, it’s a dream come true—a “SICP-light” that blends discrete mathematics and functional programming in a way that’s both accessible and practical. It feels like a streamlined take on Structure and Interpretation of Computer Programs (SICP), with a clear focus on connecting theoretical concepts to coding in Standard ML. The book balances rigorous discrete math topics—like sets, logic, and relations—with functional programming techniques, showing how they interlock in real-world applications.
Discrete Mathematics & FP is a wonderful guide to help bridge the gap between discrete math and programming. I highly recommend it. The concepts are broken down simply without oversimplification and the exercises are very satisfying. I'd recommend working through this at the same time you're working through Susan Epp's Discrete Mathematics with Applications 4e to get the maximum benefit out of it. Well worth your time & energy, both of these books will make you a better programmer and thinker.