This question arises from the section "Bad monads and their denizens" of section 18.5 "Monad laws" of the book "Haskell Programming from first principles".

```
data CountMe a =
  CountMe Integer a
  deriving (Eq, Show)
instance Functor CountMe where
  fmap f (CountMe i a) =
    CountMe i (f a)
instance Applicative CountMe where
  pure = CountMe 0
  CountMe n f <*> CountMe n' a =
    CountMe (n + n') (f a)
instance Monad CountMe where
  return = pure
  CountMe n a >>= f =
    let CountMe n' b = f a
    in CountMe (n + n') b

```

I have some problems understanding how Monad CountMe's bind works using equational reasoning:

`CountMe (n + n') b`
becomes
`CountMe n b + CountMe n' b`
becomes
`CountMe n b + f a`

Is this correct? If so, what does `CountMe n b` become?

If equational reasoning cannot be done, how should I understand how this works?

```
  CountMe n a >>= f =
    let CountMe n' b = f a
    in CountMe (n + n') b

```