Adding the state monad

http://taumuon-jabuka.blogspot.ca/2012/06/state-monad-in-c-and-f.html?m=1