generalize the store monad used in the queue example to
make it more plausibly extract as reference cells

The current extraction still has all of the monadic
plumbing, tho.