RFC: Collection Framework, reprise.
sebastian.sylvan at gmail.com
Thu Feb 23 12:27:09 EST 2006
On 2/23/06, Sebastian Sylvan <sebastian.sylvan at gmail.com> wrote:
> Sometimes you want to add an element, or update an existing element if
> one exists.
> You may, for example, want to store a list of values at each node in a
> Map, so if a key doesn't exist you add a singleton list, if the key
> does exist you add the new value to the list with that key. The value
> type is thus of a *different* type than the values that are inserted.
> insertWith' :: (b -> a -> a) -> (b -> a) -> k -> a -> c -> c
insertWith' :: (b -> a -> a) -> (b -> a) -> k -> b -> c -> c
More information about the Libraries