Many functional programs can be viewed as representation changers, that is, as functions that convert abstract values from one concrete representation to another. Examples of such programs include base-converters, binary adders and multipliers, and compilers. In this paper we give a number of different approaches to specifying representation changers (pointwise, functional, and relational), and present a simple technique that can be used to derive functional programs from the specifications.
Hutton, G., & Meijer, E. (1996). Back to Basics: Deriving Representation Changers Functionally. Journal of Functional Programming, 6(1),