Functional Programming as a Discrete Mathematics Topic
1. Baldwin, D., Walker, H, and Henderson, P. The roles of mathematics
in computer science. ACM Inroads, 4, 4 (2013), 74–80; http://doi.acm.
2. Beseme project; http://www.cs.ou.edu/˜beseme/. Accessed 2016 July 5.
3. Decker, A. and Ventura, P. We claim this class for computer science: A nonmathematician’s discrete structures course. In Proceedings of the 35th SIGCSE
Technical Symposium on Computer Science Education, SIGCSE ’04, 442–446. (New
York, ACM, 2004).
4. Doets, K. and vanEijck, J. The Haskell Road to Logic, Maths and Programming.
King’s College Publications ( Texts in Computing), London, 2004.
5. Graham, P. Revenge of the nerds, May 2002; http://www.paulgraham.com/icad.
html. Accessed 2016 June 5.
6. Henderson, P. Functional and declarative languages for learning discrete
mathematics. In The Proceedings of the International Workshop on Functional and
Declarative Programming in Education, 2002. Technical Report No. 0210 of the
University of Kiel; https://www.informatik.uni-kiel.de/˜mh/reports/fdpe02/papers/
paper7.ps.gz. Accessed 2016 July 5.
7. Henderson, P. Sunset time. ACM Inroads, 6, 1 (2015), 33–34.
8. Henderson, P. and Stavely, A. Programming and mathematical thinking. ACM
Inroads, 5, 1 (2014), 35–36.
9. The Interim Review Task Force. Computer Science Curriculum 2008: An Interim
Revision of CS 2001, December 2008; http://dl.acm.org/citation.cfm?id=2593246.
Accessed 2016 July 5.
10. Jaume, M. and Laurent, T. Teaching formal methods and discrete mathematics. In
Proceedings 1st Workshop on Formal Integrated Development Environment, F-IDE
2014, Grenoble, France, April 6, 2014, 30–43; http://dx.doi.org/10.4204/EPTCS.149.4.
11. The Joint Task Force on Computing Curricula. Computing Curricula 2001, December
2001; https://www.acm.org/education/curric_vols/cc2001.pdf. Accessed 2016 July 5.
12. The Joint Task Force on Computing Curricula. Computer Science Curricula 2013.
Technical report, ACM Press and IEEE Computer Society Press, December 2013;
13. McCauley, R., et al. Teaching and learning recursive programming: a review of the
research literature. Computer Science Education, 25, 1 (2015), 37 – 66; http://dx.doi.or
14. McMaster, K., Anderson, N., and Rague, B. Discrete math with programming: Better
together. In Proceedings of the 38th SIGCSE Technical Symposium on Computer
Science Education, SIGCSE ’07, pages 100–104, (New York, ACM, 2007); ACM.
15. Norvig, P. Design patterns in dynamic languages, March 1998; http://norvig.com/
design-patterns/. Accessed 2016 July 5.
16. O’Donnell, J., Hall, C., and Page, R. Discrete Mathematics Using a Computer.
Springer, London, second edition, 2006.
17. Page, R. Software is discrete mathematics. In Proceedings of the Eighth ACM
SIGPLAN International Conference on Functional Programming, ICFP ’03,79–86,
(New York, ACM, 2003). http://doi.acm.org/10.1145/944705.944713.
18. Power, J., Whelan, T., and Bergin, S. Teaching discrete structures: A systematic
review of the literature. In Proceedings of the 42Nd ACM Technical Symposium on
Computer Science Education, SIGCSE ’ 11, 275–280, (New York, ACM, 2011).
19. Scharff, C., and Wildenberg, A. Teaching discrete structures with SML. In The
Proceedings of the International Workshop on Functional and Declarative
Programming in Education, 2002. Technical Report No 0210 of the University of
Kiel. https://www.informatik.uni-kiel.de/˜mh/reports/fdpe02/papers/ paper12.ps.gz.
Accessed 2016 July 5.
20. Spolsky, J. Can your programming language do this? http://www.joelonsoftware.
com/items/2006/08/ 01.html. Accessed 2016 July 5.
21. Stavely, A. Programming and Mathematical Thinking: A Gentle Introduction to
Discrete Math Featuring Python. (Socorro, NM, The New Mexico Tech Press, 2014).
22. VanDrunen, T. book; http://cs.wheaton.edu/˜tvandrun/dmfp/. Accessed 2016 July 5.
23. VanDrunen, T. The case for teaching functional programming in discrete math. In
Proceedings of the ACM International Conference Companion on Object Oriented
Programming Systems Languages and Applications Companion, OOPSLA ’ 11, 1–86,
(New York, ACM, 2011); http://doi.acm.org/10.1145/2048147.2048180.
24. VanDrunen, T. Discrete Mathematics and Functional Programming. (Wilsonville,
Oregon, Franklin, Beedle and Associates, 2013).
25. Wainwright, R. Introducing functional programming in discrete mathematics. In
SIGCSE ’92: Proceedings of the twenty-third SIGCSE technical symposium on
Computer science education, 147–152, (New York, ACM, 1992); http://doi.acm.
26. Xing, C. Enhancing the teaching and learning of functions through functional
programming in ML. Journal of Computer Sciences in Colleges, 23( 4):97–104,
Department of Mathematics and Computer Science
501 College Ave, Wheaton, IL 60187
DOI: 10.1145/3078325 ©2017 ACM 2153-2184/17/06 $15.00
DOES A DISCRETE MATH COURSE
HAVE ROOM FOR ANOTHER TOPIC?
A computer science program considering this approach likely
has a discrete math course that already feels overfull. Is it realistic for functional programming to be yet another item to
squeeze in? Of course, this problem is not unique to the discrete math course. Many of us also feel that the introductory
programming course is overfull, as is the data structure course,
and most other required courses, with ever more pressure to
include newer material. The problem is even more acute at liberal arts colleges where hours in the major are limited.
Computer science programs should address that problem systemically and in a way appropriate to their curricular
needs. One might notice that my course in most semesters
defers topics like graph theory, number theory, and combi-natorics to be covered by later courses. Other programs find
they need two semesters of discrete math to cover all the topics they wish to include. But I suggest that programs for whom
DMFP is appropriate not think of functional programming
as an isolated topic to be added but rather as a parallel topic
in which the other topics are packaged. Viewed holistically,
programs may find including functional programming in the
discrete math course to be more efficient in the curriculum
rather than burdensome.
ARE THERE RESOURCES
FOR THIS APPROACH?
Doubtless the idea of uniting discrete math with functional
programming will be new to many, but teaching resources and
experience reports are available for those who would consider this approach. My own textbook works out the details of a
course like what I have taught [ 24], with videos, sample code,
and other supporting resources online [ 22]. The Beseme Project, mentioned earlier, provides lecture sides, software, and
test questions [ 2], and can be used to accompany a textbook
by O’Donnell et al. [ 16], which uses Haskell in a discrete math
course. Another discrete math textbook by Doets and vanEijck also uses Haskell [ 4], and a textbook by Stavely uses Python
[ 21]. Moreover, the literature records educators’ experiences
with this approach as early as 1992 [ 6, 19, 25, 26].
DMFP is not a silver bullet for the problem of integrating
math thinking into the computer science curriculum. A discrete
math course, even one using the DMFP approach, cannot bear
the entire weight of the task. To make the best use of formal
reasoning, all courses at all levels must make the connections
between math and programming explicit. I encourage my colleagues, however, to consider DMFP as a starting point which
many institutions may find useful for solving various curricular
needs. The most important need, in my view, is to get discrete
mathematics out of a silo and to show its relevance to programming from the beginning so that subsequent courses can build
on this foundation. But it also is an efficient way to serve multiple student populations and to give CS majors an early introduction to a second programming style.