haskell / haskell/containers

Data.Map lacks unionsWithKey

Open
#137 2 comments 1 reaction 0 assignees View on GitHub
feature-request Map
Dominant language
Haskell
Stars
355
Forks
194
Avg merge
3d 4h
Merged PRs (30d)
4

Description

Hi,

I currently see

```
union :: Ord k => Map k a -> Map k a -> Map k a
unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a
unions :: Ord k => [Map k a] -> Map k a
unionsWith :: Ord k => (a -> a -> a) -> [Map k a] -> Map k a
```

so it would be only consistent to have a

```
unionsWithKey :: Ord k => (k -> a -> a -> a) -> [Map k a] -> Map k a
```

as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.