Additional functions using
CoreM state. #
Count the number of heartbeats used during a monadic function.
Remember that user facing heartbeats (e.g. as used in
differ from the internally tracked heartbeats by a factor of 1000,
so you need to divide the results here by 1000 before comparing with user facing numbers.