MWF 1:10pm - 2:00pm (A6)
MC Reynolds 317
Dr. Brent Yorgey
Functional programming takes as its central organizing principle the idea of evaluating functions rather than executing instructions. It supports programming at a high level of abstraction and carefully controlling side effects, which are critical given the ever-increasing sophistication of software systems. This course explores functional programming in depth, with a unifying focus on recursion. It combines practical programming experience in Haskell with a deep exploration of the underlying theory. Covered topics include algebraic data types and pattern matching, static type systems, recursion and induction, folds, lambda calculus, laziness, functors, and monads. A few weeks will also be spent learning about computer-checked formal proofs using the dependently typed functional language/proof assistant Agda.
Upon completing this course, you will be able to:
by Gilles Dowek is a required text for the course. It looks like
you can rent an eBook version for the semester for about $10, or
purchase a paper copy for about $35.
You will need to install a Haskell toolchain on your computer. The
easiest way is to simply follow the instructions
here to install
the stack tool. You should then be able to run ghci using the
command stack ghci. (You may have to run stack setup first.)
Please try this early and come ask for help if you are stuck!
If you have a favorite text editor it will probably work just fine
for editing Haskell programs. IntelliJ-IDEa has good support for
other editors commonly used with Haskell include Atom (see this
page for help getting set up),
TextMate, and Sublime Text. emacs also has very nice Haskell
support; I recommend installing
Instructions on how to build and use Agda will be forthcoming later
in the semester.
If you would find it helpful to have a textbook, try Graham Hutton’s
Haskell. Not everything
we will cover is in there but it has significant overlap.
Haskell Programming from first principles
is another Haskell book which has been getting good reviews, and
seems quite comprehensive, though I have not personally looked at it.
Many people from the Haskell community are active on
which can be a good place to ask questions.
The Haskell-beginners mailing
list is a good place
to ask beginner-level questions.
The Haskell-cafe mailing
list can also be
a good place to ask questions, but is much higher-traffic.
The Haskell wiki has a
list of frequently asked questions.
explains many of the type classes in the standard libraries
(Functor, Applicative, Monad, Monoid, Arrow, Foldable,
The Haskell wikibook
actually contains a substantial amount of well-written information;
a great resource if you’re having trouble understanding a particular
topic and want a different approach.
Planet Haskell aggregates blog posts
from the Haskell community.
There is a Haskell subreddit for
aggregating Haskell-related websites, blog posts, and news.
Haskell standard library documentation.
A useful Haskell cheatsheet.
Hackage is a huge repository of
Haskell packages. If it isn’t on Hackage, it doesn’t exist.
Looking for a function but don’t know what it’s called? Want to see
the documentation for a particular function?
Hoogle searches many standard
libraries and can search either by name or by type.
Hayoo is another
search engine for the Haskell documentation, which is much more
complete (it searches all of Hackage).
If you really want the nitty-gritty details of the Haskell language
standard, see the 2010 Haskell
First, install emacs.
sudo apt install emacs
Next, install Agda.
stack --resolver=lts-13.25 install Agda-188.8.131.52 EdisonCore-184.108.40.206 data-hash-0.2.0.1 equivalence-0.3.4 geniplate-mirror-0.7.6 EdisonAPI-1.3.1 STMonadTrans-0.4.3
stack path --local-bin
Open a .agda file in Emacs. If everything is working, you should
see (Agda) at the bottom of the screen, telling you that Emacs is
in Agda mode.
Starting March 4, lectures are available as videos on YouTube.
Successful participation in the course means:
Problem sets will be assigned weekly and due on Wednesday before the
start of class. Each problem set will be worth 40 points and will
typically have both a written component and a programming
component. They will be challenging: you should expect to spend time
working on them throughout the week; waiting until the night before a
problem set is due is very unlikely to go well.
Problem sets may be completed individually or in groups of up to 3.
You may pick your own groups (though I am happy to serve the role of
matchmaker if you need help finding a group).
Assignments must be turned in electronically via
codepost.io, as one or more .hs, .lhs,
and/or .agda files. Written components of the assignment should
simply be included as comments.
Each student has three late days to spend throughout the semester as
they wish. Simply inform me any time prior to the due date for an
assignment that you wish to use a late day; you may then turn in the
assignment up to 24 hours late with no penalty. Multiple late days
may be used on the same assignment. There are no partial late days;
turning in an assignment 2 hours late or 20 hours late will both use 1
Partners working on an assignment together must each use a late day in
order to turn in the assignment up to 24 hours late. Late days are
There will be 12 weekly short quizzes (typically on Fridays) testing
you on key aspects of the previous week’s problem set. However, note
that despite being short, these quizzes will constitute a significant
fraction of your final grade (about 25%). Each quiz will be worth 20
Grading of the quizzes will be mastery-based: you can re-take a quiz
as many times as you like; each time you retake a quiz the new grade
replaces the previous grade. The first iteration of a given quiz will
be in class, in written form. To retake a quiz, just schedule a
15-minute meeting slot, being sure to
clearly indicate which quiz or quizzes you intend to retake.
You will complete a final project which will extend or tie together
some of the things we have learned over the course of the semester.
You may work by yourself, or in groups of up to three students.
Groups of five are right out.
You have quite a bit of latitude in what sort of project you choose to
complete (subject to approval, of course). Possible types of projects
include (but are not limited to):
Your project should somehow go beyond what we have covered in class,
that is, completing the project should require you to learn something
You must submit a project proposal explaining what you intend to
do. The proposal should be about 1 page, and should clearly explain:
During the week of April 27–May 1, your group must schedule a 30-minute
meeting with me to discuss your progress, ask questions, etc. (of
course I am happy to meet with you at other times as well.)
In the afternoon on Friday, May 8, you will give a 15–20 minute
presentation on your project. The presentation could take many forms
depending on the type of project. For example, it could just be a
demo, if you primarily produced some sort of artifact; it could be a
presentation with slides or a chalkboard talk explaining something.
You may submit your project in one of two ways:
By emailing me a .tar, .tgz or .zip file
By emailing me a link to a publically accessible source
repository, e.g. on github, bitbucket, or hub.darcs.net. Be sure
to submit a link to one or more specific commits, tags, etc.
representing what you would like to be graded, rather than just to
the repository in general.
Grading will be as follows:
Proposal (30 points).
Style (30 points). Your project should use good Haskell or Agda style
and be well-documented.
Checkpoint (30 points). Did you make some progress on your
project by the time of the checkpoint meeting? Were you prepared
with good questions to ask?
Presentation (50 points). Your presentation should be clear and
instructive, demonstrating your project and what you learned.
Correctness (60 points). Your project should be free of compilation
errors and should correctly accomplish whatever it is supposed to
accomplish. This means that if the deadline is looming, your time
would be better spent fixing bugs in what you already have than
adding one last feature.
Effort/accomplishment (60 points). I will be looking for evidence that
you put energy and effort into your project and that you have
learned something. In your presentation, you should be sure to
highlight work you did and things you learned, especially if it is
not obvious from looking at the final product. For example, if
you spent a bunch of time trying an approach that ultimately did
not work, you should talk about that and what you learned from the
Final grades in the course will be determined on the basis of total
points accured, according to the following schedule:
It is my ultimate goal for this course, and my teaching, to
develop your academic skills, advance your learning
of math and computer science concepts, and support the liberal arts in general. To do so
will require commitments from myself and from you toward meeting this goal.
I will be prepared and on time for class each day, ready to use class time
to help you understand the course material. I will respectfully listen to,
understand, and answer questions asked in class.
You are expected to attend class and actively participate in discussions every day,
answering questions, asking questions, presenting material, etc. Your
participation will be respectful of your classmates, both of their
opinions and of their current point in their educational journey, as we
each approach the material with different backgrounds and contexts.
I will clearly communicate expectations,
assignment details and dates, and grading
I will respond to emails within 24 hours
You are expected to check your email for
occasional course announcements, and to let me
know via email if you will need to miss class
for some reason.
I will provide graded feedback on
assignments (problem sets and quizzes) within
for appointments outside of class and will
give you my full attention during meetings. I
will be open to feedback and willing to
respond in substantive ways to your
suggestions or concerns.
You are encouraged to provide constructive comments for improving this
course for furthering your learning throughout
the semester. You are welcome
anonymous feedback at any time.
There will also be an opportunity for
anonymous course feedback
at the end of the term, in which I hope you all participate. Through your
feedback I can improve this course and others for future students.
I will abide by the above syllabus and
grade your work fairly.
As stated in the Hendrix Academic
Integrity Policy, all students have agreed to adhere to the following principles:
I will make this classroom an open and inclusive environment,
accommodating many different learning styles and perspectives.
seeking accommodation in relation to a recognized disability should inform me
at the beginning of the course.
It is the policy of Hendrix College to accommodate students with disabilities, pursuant
to federal and state law. Students should contact Julie Brown in the
Office of Academic
Success (505.2954; email@example.com) to begin the accommodation process.
I am willing to work with you individually when life goes off the rails.
Coursework and college in general can become stressful and overwhelming, and
your wellness can be impacted when you least expect it. You should
participate in self-care and preventative measures, and be willing to
find support when you need it.
The Offices of Counseling Services and Student Health Services are located in the white house
behind the Mills Center for Social Sciences at
1541 Washington Avenue.