[Haskell-cafe] Motivation for having indexed access in Data.Map?

2012-01-07 Thread Christoph Breitkopf
Hello, I wonder why Data.Map provides the indexed access functions: http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-Map.html#g:21 These functions seem rather out-of-place to me in the map api. The only use case I could think of so far would be to find the median, or

Re: [Haskell-cafe] Motivation for having indexed access in Data.Map?

2012-01-07 Thread Steve Horne
On 07/01/2012 12:17, Christoph Breitkopf wrote: Hello, I wonder why Data.Map provides the indexed access functions: http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-Map.html#g:21 These functions seem rather out-of-place to me in the map api. The only use case I