Be warned that modifySTRef does not apply the function strictly. This
means if the program calls modifySTRef many times, but seldomly uses the
value, thunks will pile up in memory resulting in a space leak. This is a
common mistake made when using an STRef as a counter. For example, the
following will leak memory and may produce a stack overflow: