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
Practice Problems 4: 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 Lecture Slides: PDF


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

10  M 2/25  Review for Midterm Reading: Hutton, Ch.8. 

11  W 2/27  Midterm 1  
12  M 3/4  Functors and monads: the Maybe Monad Reading: Hutton, Ch. 12 Monads (and functors and applicatives) in pictures:HTML 

13  W 3/6  Monads continued; parsing and contextfree grammars; parse trees. Three useful monads in pictures: HTML 
HW 5 out, due 3/19  
3/11  3/15  Spring Break! 

14  M 3/18  Lambda Calculus  
15  W 3/20  The State Monad; Implementing a functional language: Abstract Syntax Trees, Environments, and Recursive Evaluation. 
HW 6 out, due 3/26  
16  M 3/25  Dynamic vs static scope, closures. 

17  W 3/27  Eager vs lazy evaluation; simultaneous evaluation; infinite lists. 
HW 07 out, due 4/1  
18  M 4/1  Conclusions and review for midterm. 

19  W 4/3 
Midterm 2 

20  M 4/8  Introduction to Compilation: General notions, Intermediate Code, Translating assignments and expressions.  
21  W 4/10  Translating conditionals and loops  HW 8 out, due 4/16  
M 4/15  Tax Day: Holiday!  
22  W 4/17  Translating shortcircuit Boolean expressions;  Final Project out, due F 5/3  
23  M 4/22  Implementing Function Definitions; the runtime stack.  
24  W 4/24  Function definitions concluded  
25  M 4/29  Dependent Types  
26  W 5/1  Conclusions and course evaluations. 