MapReduce function examples