Messing with map functions in CouchDB