http://wiki.apache.org/couchdb/Built-In_Reduce_Functions
Anonymous
Prototype before polishing. Get it working before you optimize it.