Queues and Deques in SML

Companion source code to
Chris Okasaki
Simple and Efficient Purely Functional Queues and Deques
Journal of Functional Programming, 5(4):583-592, October 1995.
(Copyright by Cambridge University Press)
All companion source code is written for SML/NJ (version 0.93).

We give implementations of three different data structures.

For comparison, three further implementations of queues are provided. A fair comparison for our implementation of deques can be found in Chuang and Goldberg, "Real-time deques, multihead Turing machines and purely functional programming", FPCA '93. They present an extension to the Hood/Melville approach to handle double-ended queues. They also provide SML source code.