Initial pass at a Reader/Writer/State (RWS) monad