Thinking about monad, it came to me the idea of a monad as the way to break with the Von Neumann architecture. The Von Neumann architecture uses a set of instructions (calle
Your implementation throws away the number of steps in f. Shouldn't you add them?
(Counter n1 a) >>= f = let Counter n2 b = f a in (Counter (n1+n2) b)