programming language. As much as possible, the presentation
illustrates the math concepts. Types are introduced as sets, with
specific types like int as a model of the mathematical set of integers. Tuple types naturally implement Cartesian products.
Sample programming problems include defining new types using ML’s datatype construct, like enum types in other languages.
They are a way to capture real-world information, for example a
collection of types to model menu items and combination meals
at a restaurant. Students learn the structure of expressions and
types by analyzing the types of expressions and their subex-pressions, such as in one of the sample problems of Figure 2.
We also introduce the concept and syntax of a function in ML,
based on students’ previous knowledge of mathematical functions. After simple examples of the Fahrenheit-to-Celsius sort,
students see their first recursive functions.
The second unit introduces ML list types. While learning a
simple data structure is important on its own, this unit is a context for students to practice writing recursive functions. ML’s
list-processing idioms, which use pattern-matching, provide an
intuitive way to reason through a problem in terms of itself.
But lists also serve as a MacGuffin to keep the mathematical
content stream moving, in that lists can also be used to repre-
sent sets. The students’ assignments include implementing set
erties. Page reported data showing that the Beseme project im-
proves students’ performance on programming tasks in a data
structures course [ 17].
Applying mathematical reasoning to software development
enables students to express and reason about the properties
of the software artifacts they produce and maintain. As Page
reported [ 17], “Beseme Project results support the conjecture
that experience in the direct application of logic to reasoning
about software leads to increased effectiveness in the practice
of software development.” He continued that programming languages that are thoroughly functional “provide useful and compact ways to express mathematical concepts.”
WHAT ARE THE CONTENTS OF A DISCRETE
MATHEMATICS COURSE WITH FUNCTIONAL
The course I teach is four credit hours. There are seven units
over fifteen weeks. The units are summarized in Figure 1. The
first unit introduces the “raw materials,” both mathematical and
computational. We introduce sets and their operations, along
with set concepts like cardinality and Cartesian products. Concurrently, the students are given a basic introduction to the ML