Instructor: Prof. Seth Fogarty
Email: sfogarty@trinity.edu
Office: CSI 270M
Office Hours: Posted on webpage
Meets: MWF 11:30 and 1:30 in CSI 257
Textbook: Learn You a Haskell for Great Good (Available free online)
The purpose of this course is to introduce the theory, practice, and design principles of functional programming. Functional programming views computation as the calculation of mathematical functions. We will be using Haskell, a purely-functional, strongly-typed, lazily-evaluated language. The course is taught using a problem-driven design, where programming concepts are introduced in a just-in-time fashion. Many of the problems will come from artificial intelligence and programming languages. This course is designed for computer science majors, and will cover a variety of topics.
Functional programming in the small: How to create small, purely functional programs in a strongly typed language. Types include tuples, records, disjoint types, recursive types, type classes, and monads. Programming techniques include pattern matching, recursion, higher-order functions, and I/O.
Functional program design: How to design larger functional programs, as embodied by a larger end-of semester project that will result in a command-line program of some complexity.
Data parallelism: Functional languages naturally support parallel evaluation with no possibility of altering the output, including parallel evaluation of arguments and the map/reduce framework.
The primary objective of this course is not to make the student a proficient Haskell programmer, but to make them better problem solvers in whatever language they use. In specific, this course stresses:
Decomposition: Breaking a problem into logical sub-problems to produce readable, coherent, and maintainable programs.
Abstraction: Writing concise, expressive programs that embody computation at a high level.
Recursion: Solving a problem by decomposing it into smaller problems of the same type, as well as data structures composed of smaller instances of the same type of structure.
This course meets three times a week, and is structured around in-class activities, individual programming projects, and a significant group project.
Class Activities: Each class will contain at least one problem, and some days will be devoted to longer activities or in-class assignments.
Individual Projects: There will be a series of individual programming projects in the first half of the semester covering functional programming constructs.
Group Projects: There will be a large group project in the second half of the semester. You will implement a command-line solver for a two-player game of perfect information.
Students are expected by abide the Trinity University Honor code. Students must complete individual projects individually. Collaboration via whiteboard or paper is explicitly allowed on individual projects, but all code must be written alone. When collaborating remotely students are permitted to use collaborative documents such as Google Docs, online whiteboards, and similar non-development tools. However, code must be manually transcribed to/from such tools, and may not be "copy-pasted" from collaborative documents. Students may not look at each other's code, either in-person or via a shared screen, unless it has been manually transcribed to paper, whiteboard, or a collaborative document. Further, the use of computers, tablets, or cell phones during class is prohibited outside of class activities.
Students are expected to attend all regular classes. Students who will miss class should notify me by email before their absence. Under the COSB, absences for religious observations and University-sponsored activates are fully excused. For the duration of the COVID-19 pandemic, students who are ill will be fully excused from classes. While the University is mandating masks indoors, students whose masks are not worn properly will be asked to leave class. This will be marked against attendance.
In line with the Trinity University policy on equal access and equal opportunity, this course will be made accessible to all students. Any student who feels they may need accommodations based on the impact of a disability or long illness should contact me and the office of Student Accessibility Services to discuss your specific needs.
Please be aware that all classroom instruction, including student participation in classroom activities, is subject to recording and dissemination on secure University systems. The recordings will be made available only to students enrolled in the course to facilitate online learning and review. Students are expressly prohibited from capturing or copying classroom recordings by any means; violations will be subject to disciplinary action. Instructors who wish to use a recording outside of class must obtain the written consent of any students who are personally identifiable in the recording.