Abstract

A recent paper by Graham Hutton and Diana Fulger (`Reasoning about Effects: Seeing the Wood through the Trees', Trends in Functional Programming, 2008) addresses the problem of reasoning about e ffectful functional programs, using a relabelling function on binary trees as a simple example. We argue that their approach is less e ective than it might be, because they miss two opportunities for higher-level reasoning: abstraction from the particular kinds of e ect (the choice of monad) and from the pattern of recursion (the flow of computation). We present two alternative approaches using properties of idiomatic traversals, which cleanly separate the twin concerns of the kinds of eff ect and the pattern of recursion.


posted 4611 days ago