Spring, 2018




Useful Links

Lecture 
Date 
Lecture & Readings/Videos 
Assignments and Practice Problems 

1  W 1/23  Administrative matters; Overall Plan for the course; Motivation: Why learn functional Programming? Lecture Slides: PDF Here is my channel where I will post lecture videos: YT 

2  M 1/28  BareBones Haskell: Constructing data expressions, functions on data expressions, expressions as trees, rewrite semantics; Reading: Hutton Chapters 1 & 2; also you could look at section 8.2 on data declarations (just for the basic idea; ignore anything you don't understand). Lecture Slides: PDF Also, make sure you remember recursive tree traversals, particularly preorder and postorder; here is my CS 112 lecture on this: PDF Here is a video talkthrough of the last couple of slides from Lecture 2, which I did not finish in section A1: HTML 
Practice Problems on data and function definitions and computation by matching and rewriting: HTML  
3  W 1/30  Function definition by pattern matching; polymorphic types. Reading: Hutton, Ch. 3.1  3.7 Lecture Slides: PDF

HW01 Solution: PDF
Video walkthrough of HW 1 analytical part (with hints!):HTML 

4  M 2/4  Polymorphic data and functions; type checking; function definitions; modules Reading: Hutton, Ch. 3.8  end, 4.1  4.4 Lecture Notes: PDF 
Practice Problems 2 A Alternate (using buildin syntax for Integers, tuples, and lists) HTML
Practice Problems 2 B Alternate (using buildin syntax for Integers, tuples, and lists) HTML 

5  W 2/6  Functions as firstclass values; map and filter;lambda expressions; functions manipulating functions; modules. Reading: Hutton, Finish chapter 4. On modules, read HTML up to right before the section on Data.List. Lecture Notes: PDF

Solution for HW 2, analytical part: PDF
Typo fix in problem One a4 uploaded 2/10 11am. Here is a short video with some hints: HTML 

6  M 2/11  Basic Haskell: Haskell builtin list and tuple types; Case expressions; Betareduction for lambda expressions and let expressions; HO programming continued: Curried functions; (if time) Function composition with currying.
Reading: Hutton Ch. 4 & 7 Lecture Slides: PDF 
Practice Problems 3: HTML  
7  W 2/13  Curried functions, HO programming paradigms concluded: foldr; Type classes. Reading: Hutton 5 & 15.115.5 Lecture Slides: PDF 
HW 3 out, due 2/19  
M 2/18  President's Day: Holiday  
8  T 2/19 
Virtual Monday!
Type classes Continued. Reading: Hutton, reread Ch. 3 and then read 8.1  8.5, and also section 12.1 (on Functors) This section from "Learn you a ...." is also worth reading on the basic type classes: HTML Also the beginning of this section, about the Functor type class, is very good: HTML The first part of this, Functors with Pictures, is very good: HTML Lecture Slides: PDF


9  W 2/20  Type classes concluded.
Reading: Same as last time. Reread it! Lecture Slides: PDF 
HW 4 Solution: PDF, due 2/25 

M 2/25  Review for Midterm Reading: Hutton, Ch.8. 
Midterm Study Guide: HTML  
W 2/27  Midterm 1
Midterm A: PDF Midterm B: PDF Midterm C: PDF Midterm D: PDF 

10  M 3/4  Monads: the Maybe Monad Lecture Slides: PDF MonadLectureCode1: HS MonadLectureCode2: HS Video walk throughs of these two files have been uploaded to the YT channel linked at the top of this page, as well as a brief summary of my lecture. Required Readings:
Optional readings (if you are interested):
Here are some videos on monads:
Even more optionally, here are some informative links about monads: 

11  W 3/6  Monads continued; the Ok Monad; the List Monad; List Comprehensions Lecture Slides: PDF MonadLectureCode3: HS Video walk throughs of this file, and a twopart summary of my lecture have been uploaded to the YT channel. 
HW 6, Analytical Part Solution (goes with week 7 code assignment): PDF Video with hints on the homework has been uploaded to YT channel. Examples and easy test cases for coding assignment: HS 

3/11  3/15  Spring Break! 
Response to Survey: PDF  
12  M 3/18  The State Monad
Lecture Slides: PDF 

13  W 3/20  Implementing a functional language: Syntax, ContextFree Grammars, Parse Trees, Derivations; Parsing and Abstract Syntax Trees. Lecture Slides: PDF Reading on ContextFree Grammars: PDF Another reading: HTML Complete BNF for Haskell (see section 9.5): HTML 
Solution to Analytical HW for Week 8: PDF  
14  M 3/25  Parsing and Grammars Example code from lecture: HS Lambda Calculus 1 Reading: Introduction to the Lambda Calculus: PDF 

15  W 3/27  Lambda Calculus 2: Confluence and Evaluation order Haskell: Lazy evaluation and infinite data structures Lecture Notes: PDF Reading: Hutton, 12.1  12.5 
Examples/Easy Test Cases for Lambda Parser: HS
Examples/Easy Test Cases for Lambda Calculus Implementation: HS 

16  M 4/1  Infinite Lists; Lazy evaluation in Haskell concluded. Reading: Finish chapter 15 in Hutton, then read this more precise exposition: HTML Lecture Notes: PDF 

17  W 4/3 
Conclusions on lazy evaluation in Haskell; foldl vs foldl' Read section 7.4 in Hutton on foldl. Here is a rather complete introduction to lazy vs strict evaluation: HTML Reading on scope (from stack overflow, with nice code examples): HTML Lecture Notes: PDF 
Solution to last analytical hw: PDF Easy test cases for parser for last coding homework: HS 

18  M 4/8  Implementing imperative features: assignments, loops, and mutable state.  
19  W 4/10  Review for Midterm 2; Discussion of final project.  Midterm 2 Study Guide and Practice Problems HTML Semester Project Writeup in on gitHub! 

M 4/15  Tax Day: Holiday!  
W 4/17  Midterm 2  
20  M 4/22  Comments on the Project: general overview and static type checking
Lecture Slides: PDF 

21  W 4/24  Comments on Project: Testing  
22  M 4/29  Advanced topics: Dependent Types  
22  W 5/1  Conclusions and course evaluations.  
F 5/3  Final Project Due 