mongodb/cookbook — pull request #4 by dcrosta (2011-12-14 20:04:24+00:00)
Title: Pattern: Track maximum value in array

based on http://stackoverflow.com/questions/8508663/calculate-max-value-in-an-atomic-findandmodify-operation/8509324#8509324