Fix type of FrequencyTable
Add initial MapReduce monad implementation