Good ideas and conversation. No ads, no tracking. Login or Take a Tour!
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 effectful functional programs, using a relabelling function on binary trees as a simple example. We argue that their approach is less eective than it might be, because they miss two opportunities for higher-level reasoning: abstraction from the particular kinds of eect (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 effect and the pattern of recursion.