- Links to tutorials and other resources on Scheme, OCaml, and Haskell
- Other Offsite Reading
- Old links
- Functions
- Functional vs imperative programming
- General issues about variables and scope in programming languages
- Untyped lambda calculus and combinatory logic
- Evaluation Order
- Confluence, Normalization, Undecidability
- Recursion and the Y Combinator
- Folds
- Types
- Monads
- Monads in Category Theory
- Side-effects / mutation
- Continuations
- The Curry-Howard Correspondence
- Linear Logic
- Other

## Links to tutorials and other resources on Scheme, OCaml, and Haskell

- Help on Learning Scheme
- Help on Learning OCaml
- Help on Learning Haskell

- This site's explanation of the differences between these languages

## Other Offsite Reading

## Old links

*The links below are from the last time we taught the course; we should check them again...*

There's lots of links here already to tutorials and encyclopedia entries about many of the notions we'll be dealing with.

Many of these links are to Wikipedia. You can learn a lot from such articles, so long as you remember they may sometimes mislead or make mistakes. However, I hope at this point in your education you'll have learned to be a guarded reader even of authoritative treatises by eminent authors. So you shouldn't need any Wikipedia-specific warnings.

For most readers, many bits of reading we point you to will be hairy in one way or another. It may be aimed at audiences with more programming experience; it may be aimed at audiences with specific logical background you don't yet have; it may be aimed at audiences familiar with technical areas in linguistics you're first encountering. Or perhaps several of these at once. We hope you will already have mastered the skill of leveraged reading: getting what you can out of an article you don't fully understand, so that you can discuss it with the rest of the group and hopefully get to a point where you can read it again and get more out of. (Rinse and repeat.)

### Functions

### Functional vs imperative programming

- Declarative programming
- Functional programming
- Purely functional
- Referential transparency (computer science)
- Side effects
- Imperative programming

### General issues about variables and scope in programming languages

- Variables
- Free variables and bound variables
- Variable shadowing
- Name binding
- Name resolution
- Function parameters
- Variable scope
- Closures

### Untyped lambda calculus and combinatory logic

- Dana Scott's Turing centenary address on the lambda calculus
- Lambda calculus <!~- Haskell Curry had ideas that he felt were validated upon reading a 1924 paper by M. SchÃ¶nfinkel "Uber die Bausteine der mathematischen Logik" which used combinators in a similar way to his own ideas. Curry then wrote "An analysis of logical substitution" which appeared in the American Journal of Mathematics in 1929. ~->
- Moses SchÃ¶nfinkel
- Haskell Curry
- Alonzo Church
- Combinatory logic at the Stanford Encyclopedia of Philosophy
- SKI combinatory calculus
- B,C,K,W system
- Jeroen Fokker, "The Systematic Construction of a One-combinator Basis for Lambda-Terms" Formal Aspects of Computing 4 (1992), pp. 776-780. http://people.cs.uu.nl/jeroen/article/combinat/combinat.ps
- Combinator Birds
- Les deux combinateurs et la totalite by Paul Braffort.

### Evaluation Order

### Confluence, Normalization, Undecidability

- Church-Rosser theorem
- Normalization property
- Turing completeness
- Scooping the Loop Snooper, a proof of the undecidability of the halting problem in the style of Dr Seuss by Geoffrey K. Pullum

### Recursion and the Y Combinator

- Recursion
- Y combinator
- Chapter 9 from The Little Schemer on the Y Combinator "...and Again, and Again, and Again..."
- The Y combinator
- The Why of Y
- The Y Combinator (Slight Return), or: How to Succeed at Recursion Without Really Recursing
- Y Combinator for Dysfunctional Non-Schemers
- The Y Combinator
- The Y Combinator derives the applicative-order Y-combinator from scratch, in Scheme. This derivation is similar in flavor to the derivation found in The Little Schemer, but uses a slightly different starting approach...
- The church of the least fixed point, by Sans Pareil

### Folds

### Types

- Typed lambda calculus
- Simply typed lambda calculus
- Type Theory at the Stanford Encyclopedia of Philosophy
- Church's Type Theory at the Stanford Encyclopedia of Philosophy
- Type polymorphism
- System F

* Tagged union * Algebraic data type * Recursive data type * Pattern matching * Unit type * Bottom type

### Monads

- Monads in Functional Programming
- Daniel Friedman. A Schemer's View of Monads: from https://www.cs.indiana.edu/cgi-pub/c311/doku.php?id=home but the link above is to a local copy.
- A Gentle Intro to Haskell: About Monads (link currently broken, check http://www.haskell.org/haskellwiki/Tutorials)
- All About Monads (also broken, here's an archived version)
- From HaskwellWiki: Monad tutorials timeline | Monad laws | Monads as computation | Monads as containers | What a monad is not
- Haskell wikibook: Understanding monads
- You Could Have Invented Monads! (And Maybe You Already Have.)
- Yet Another Monad Tutorial: part 1 part 2
- Monads for the Working Haskell Programmer -- a short tutorial
- Introduction to Haskell: Monads
- SPb Haskell User Group: Monad tutorial
- Understanding Haskell Monads
- A Monad Tutorial for OCaml
- Beyond Monads
- Simple Explanation of a Monad
- What is a Monad?
- Can Anyone Explain Monads?
- Monad in Plain English...
- Monad in non-programming terms
- Real World Haskell: chapter on Monads
- Learn You a Haskell for Great Good: chapter on Functors, Applicative Functors and Monoids
- Monads are Elephants: Part 1 Part 2 Part 3 Part 4
- Brian Beckman: Don't fear the Monad (67 minute video)
- A monad non-tutorial...or why you shouldn't ask what a monad is
- Abstraction, intuition, and the "monad tutorial fallacy"
- How you should(n't) use Monad
- The Mother of all Monads
- Monads! (and Why Monad Tutorials Are All Awful)
- Of monads and spacesuits (archived)
- How not to explain Haskell monads
- The State Monad: a tutorial for the confused?
- Haskell state monads: part 1 part 2 part 3 part 4
- Research Papers/Monads and Arrows
- Eugenio Moggi, Notions of Computation and Monads: Information and Computation 93 (1) 1991.
- Philip Wadler. The essence of functional programming:
invited talk,
*19'th Symposium on Principles of Programming Languages*, ACM Press, Albuquerque, January 1992. <!~- This paper explores the use monads to structure functional programs. No prior knowledge of monads or category theory is required. Monads increase the ease with which programs may be modified. They can mimic the effect of impure features such as exceptions, state, and continuations; and also provide effects not easily achieved with such features. The types of a program reflect which effects occur. The first section is an extended example of the use of monads. A simple interpreter is modified to support various extra features: error messages, state, output, and non-deterministic choice. The second section describes the relation between monads and continuation-passing style. The third section sketches how monads are used in a compiler for Haskell that is written in Haskell.~-> - Philip Wadler. Monads for Functional Programming:
in M. Broy, editor,
*Marktoberdorf Summer School on Program Design Calculi*, Springer Verlag, NATO ASI Series F: Computer and systems sciences, Volume 118, August 1992. Also in J. Jeuring and E. Meijer, editors,*Advanced Functional Programming*, Springer Verlag, LNCS 925, 1995. Some errata fixed August 2001. <!~- The use of monads to structure functional programs is described. Monads provide a convenient framework for simulating effects found in other languages, such as global state, exception handling, output, or non-determinism. Three case studies are looked at in detail: how monads ease the modification of a simple evaluator; how monads act as the basis of a datatype of arrays subject to in-place update; and how monads can be used to build parsers.~-> - Ken Shan Monads for natural language semantics (2001) uses reader monad to implement intensionality.
- Ben-Avi and Winter A modular approach to intensionality (2007) reinvents the technique. <!~- http://citeseerx.ist.psu.edu/viewdocsummary?doi=10.1.1.73.6927 ~->
- Monsters and context-shifting, e.g. Gillies/von Fintel on "ifs" [not sure which paper]

### Monads in Category Theory

- Category Theory at SEP
- Category theory
- Category
- Morphism
- Functor
- Natural transformation
- Monads in category theory
- Haskell/Category Theory
- Category Theory & Functional Programming
- Learning Haskell through Category Theory, and Adventuring in Category Land
- Resources for learning practical category theory
- A Partial Ordering of some Category Theory applied to Haskell

### Side-effects / mutation

- Referential transparency (computer science)
- Side effects
- Imperative programming
- References
- Pointers
- Pointers in OCaml

### Continuations

- Continuation
- Continuation-passing style
- Call-with-current-continuation
- John C Reynolds, The discoveries of continuations
- Intro to call/cc at SchemeWiki
- Call With Current Continuation
- Continuations Made Simple and Illustrated
- Continuation kata
- Understanding continuations Commentary
- Continuations In Scheme
- Understanding Scheme Continuations. This is tagged "Part I" but I think there's no further parts.
- Continuations for Curmudgeons Commentary
- Haskell wiki on Continuations
- Haskell wikibook on Continuation Passing Style

- Delimited continuation
- Ken's paper Shift to Control, comparing some of the different delimited continuation operators
- Racket's documents on the variety of continuation operators
- Composable Continuations Tutorial at SchemeWiki
- Post by Ken on Lambda the Ultimate explaining difference between undelimited and delimited continuations
- shift, reset and streams
- guile and delimited continuations
- Delimited continuations in Scala
- Delimited Continuations Explained (in Scala)
- Partial Continuations
- Delimited Continuations in MzScheme: Part 1 Part 2 Part 3 Part 4
- Online Bibliography of Scheme Research: Continuations and Continuation Passing Style
- Delimited continuations in natural language semantics

### The Curry-Howard Correspondence

- The Curry-Howard isomorphism
- The Curry-Howard correspondence in Haskell
- Haskell wikibook on the Curry-Howard Isomorphism at Haskell wiki