Hi,

I'm looking for a function for Data.Map that will insert a new key and value
into the map if the key doesn't already exist in the map.  When the key
already exists, I don't want the value updated in the map.  Additionally, I
want to know whether the key/value was inserted or not so that I can return
that fact as a boolean from my function.

I can't work out which function in Data.Map is suitable for this task and I
wanted to avoid two lookups.

Thanks,

-John
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to