make merge-n-rows a one-liner by using map