Page 1

Abstract Data Types

Efficiency of purely functional data structures

Page 2


Drop-in office hours

For questions about the lab assignments

Page 3

Efficiency of reverse

Page 4

Testing it in GHCi

Page 5

Faster Reverse

Page 6

Faster Reverse example

Page 7

Testing it in GHCi again

Page 8

Data Structures

Page 9

What is a Queue?

Page 10

A Queue interface

Page 11

First Queue implementation

Page 12

Simple Queue efficiency?

Page 13

New idea: use two lists

Page 14

First attempt

Page 15

Live Demo

Page 16

Smart constructor

Page 17


Page 18

Queue Efficiency

Page 19

Queue Equality

Page 20

Modules and abstract data types

Modules can be used to hide implementation details

Page 21

About Export lists

Page 22

Correctness and testing

Page 23

Further reading