
I'm currently improving documentation for Data.Map. mapKeys documentation says: "The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case the value at the smallest of these keys is retained." However the implementation retains the value of the *largest* key: Prelude Data.Map> let map = fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")] Prelude Data.Map> mapKeys (\ _ -> 1) map {1:="c"} Prelude Data.Map> mapKeys (\ _ -> 3) map {3:="c"} See http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Map.html#v%3... Should I fix the documentation to confirm to the actual function behavior? Thanks, Andriy ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/