A novel representation of lists and its application to the function "reverse"
Information Processing Letters
Purely functional data structures
Purely functional data structures
Breadth-first numbering: lessons from a small exercise in algorithm design
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
ACM Transactions on Programming Languages and Systems (TOPLAS)
The Design of a Pretty-printing Library
Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text
Type-safe, self inspecting code
Haskell '04 Proceedings of the 2004 ACM SIGPLAN workshop on Haskell
Haskell ready to dazzle the real world
Proceedings of the 2005 ACM SIGPLAN workshop on Haskell
Linear, bounded, functional pretty-printing
Journal of Functional Programming
Hi-index | 0.00 |
There are several purely functional libraries for converting tree structured data into indented text, but they all make use of some backtracking. Over twenty years ago, Oppen published a more efficient imperative implementation of a pretty printer. This article shows that the same efficiency is also obtainable without destructive updates by developing a similar but purely functional Haskell implementation with the same complexity bounds. At its heart lie two lazy double ended queues.