Re: [Haskell-cafe] Data.Map traversal.

2008-06-08 Thread Ian Lynagh

Hi Serguey,

On Sat, Jun 07, 2008 at 05:32:46PM +0400, Serguey Zefirov wrote:
 
 So I propose to include those operations into next version of Data.Map.
 
 If anyone could point me in the right direction I could do any necessary 
 modifications myself (just because I need it).

Please see http://www.haskell.org/haskellwiki/Library_submissions for
how to propose changes to the libraries.


Thanks
Ian

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Data.Map traversal.

2008-06-07 Thread Serguey Zefirov
I found that I often need predecessor and successor of some key in 
Data.Map.Map. Just like that:


predKey, succKey :: Ord k = Data.Map.Map k a - k - Maybe k
predKeyElem, succKeyElem :: Ord k = Data.Map.Map k a - k - Maybe (k,a)

Data.Map has operations like that on key indexes, but it is slightly 
unnatural to work with three entities (index, key and element) where two 
suffices.


So I propose to include those operations into next version of Data.Map.

If anyone could point me in the right direction I could do any necessary 
modifications myself (just because I need it).


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe