Functional Pearls A symmetric set of efficient list operations

Rob R. Hoogerwoord · Journal of Functional Programming · 1992

In this paper we show that it is possible to implement a symmetric set of finite-list operations efficiently; the set is symmetric in the sense that lists can be manipulated at either end. We derive the definitions of these operations from their specifications by calculation. The operations have O(1) time complexity, provided that we content ourselves with, so-called, amortized efficiency , instead of worst-case efficiency

Read the paper · More papers on PaperTik