Is there an elegant way to count duplicates and write the result to a map.
I know how to do this with traditional loops etc, but I am simply very curious: is there a nice way (eg oneliner) to do this using e.g. comprehensions, reducers or a more traditional Rascal API.
So e.g. convert:
map[loc location,int nrOfOccurrencesInListOfThisLocationKey]