Add *unfinished* MapReduce

Oh Lord, this code has been in an uncommitted state probably for 1 year
old.