mapToMap - map a list to a Map using a function returning a pair