2018-12-12 23:48
Page 1

Abstract Data Types

Efficiency of purely functional data structures

Page 2

Efficiency of reverse

Page 3

Testing it in GHCi

Page 4

Faster Reverse

Page 5

Faster Reverse example

Page 6

Testing it in GHCi again

Page 7

Data Structures

Page 8

What is a Queue?

Page 9

A Queue interface

Page 10

First Queue implementation

Page 11

Simple Queue efficiency?

Page 12

New idea: use two lists

Page 13

Live Demo

Page 14

First attempt

Page 15

Smart constructor

Page 16


Page 17

Queue Efficiency

Page 18

Queue Equality

Page 19

Modules and abstract data types

Modules can be used to hide implementation details

Page 20

About Export lists

Page 21

About Import lists

Page 22
About Import lists
Page 23

Correctness and testing

Page 24

Further reading