Learn More
When a C programmer needs an efficient data structure for a particular problem , he or she can often simply look one up in any of a number of good textbooks or handbooks. Unfortunately, programmers in functional languages such as Standard ML or Haskell do not have this luxury. Although some data structures designed for imperative languages such as C can be(More)
Finite maps are ubiquitous in many applications, but perhaps nowhere more so than in compilers and other language processors. In these applications, three operations on nite maps dominate all others: looking up the value associated with a key, inserting a new binding, and merging two nite maps. Most implementations of nite maps in functional languages are(More)
In Standard ML, as in many other languages, programmers are often confronted with an unpleasant choice between pattern matching and abstraction. Because pattern matching can only be performed on concrete datatypes, programmers must often sacriice either the convenience of pattern matching or the engineering beneets of abstraction. Views relieve this tension(More)
As software systems grow in size and complexity their design problem extends beyond algorithms and data structures to issues of system design. This area receives little or no treatment in existing computer science curricula. Although courses about speciic systems are usually available, there is no systematic treatment of the organizations used to assemble(More)
Amortization has been underutilized in the design of persistent data structures, largely because traditional accounting schemes break down in a persistent setting. Such schemes depend on saving \credits" for future use, but a persistent data structure may have multiple \futures", each competing for the same credits. We describe how lazy evaluation can often(More)
We present a new data structure, called a random-access list, that supports array lookup and update operations in O(log n) time, while simultaneously providing O(1) time list operations (cons, head, tail). A closer analysis of the array operations improves the bound to O(minfi; log ng) in the worst case and O(log i) in the expected case, where i is the(More)