[Haskell-beginners] a problem with maps

Ertugrul Soeylemez es at ertes.de
Sat Jul 23 05:51:56 CEST 2011


Dennis Raddle <dennis.raddle at gmail.com> wrote:

> Another problem is have is to filter entries in a map. If I have a map
>
> Ord k => Map k [a]
>
> (essentially, which combines data with the same key into a list)
>
> and I have a predicte (k,a) -> Bool
>
> (which takes the key and one element in its list and checks it)
>
> and I need to regenerate the map, what would be a good way to do that?

See the foldWithKey function in Data.Map.


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/





More information about the Beginners mailing list