CPSC 429/529: Functional Programming

 

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

  Home
  Schedule
  Handouts
  Assignments
  Projects
  Links
 
 

Lecture 10: Lazy Streams.

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

Further Reading:

Paul Hudak. The Haskell School of Expression. Cambridge University Press, 2000.

Previous lecture: Lecture 9
Next lecture: Lecture 11