CPSC 429/529: Functional Programming

 

Instructor: Carsten Schürmann
Department of Computer Science
Yale University
Time: MWF 9:30-10:20
Room: AKW200

  Home
  Schedule
  Handouts
  Assignments
  Projects
  Links
 
 

Lecture 14: Lazy Datastructures and Coinduction

Lazyness can be used to improve the efficieny of algorithms. We will see how Fibonacci numbers can be computed using lazy lists. The implementation is as elegant as it is fast. Why does it work so well? Because lazy lists can be used to memoize.

Source Code:

lazystreams.hs

Suggested Reading Materials:

Frank Pfenning (edited by John Lafferty). Some notes on continuations

Previous lecture: Lecture 13
Next lecture: Lecture 15