Twan van Laarhoven
Twan van Laarhoven
I am not sure about `elemAt` and `deleteAt`, since they would have linear complexity, which users probably wouldn't expect. At that point you should probably use a different data structure....
Glad you like the program. I have been thinking of including 'typical opponents' in the simulator. The main issue is somehow getting realistic board states. I am currently looking into...
That seems sensible, something like ``` mapEither :: (Ord b, Ord c) => (a -> Either b c) -> MultiSet a -> (MultiSet b, MultiSet c) mapEither f = go...
At this point, isn't `mapPair` just two maps? ``` mapPair f ms = (mapOccur (\x o -> fst (f x o)) ms, mapOccur (\x o -> snd (f x o))...
But what is the advantage of doing it in one pass? We don't want to add `mapFilterFoldInOnePass :: (Ord a, Ord b, Monoid c) => (a -> (b,Bool,c)) -> MultiSet...
You can't implement mapEither in terms of other maps, and also not in terms of the proposed mapPair. Additionally, mapEither also exists in Data.Map, and Data.MultiSet tries to mirror that...
I will look into adding multiset to stackage.
It makes sense to add `mapM`. Especially because it exists for `Map` and `Set` from containers.
I agree that `fromOccurList` should be fixed. I think the most sensible thing would be to silently remove 0s and give an error for negative values. For compatibility with the...
Unicode characters in strings should work if the file is utf8 encoded. Nevertheless, an escape sequence for Unicode does make sense.