Pass generator to reduce instead of list