RFC: Collection Framework, reprise.
Sebastian Sylvan
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
>
Sorry:
insertWith' :: (b -> a -> a) -> (b -> a) -> k -> b -> c -> c
/S
--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862
More information about the Libraries
mailing list