haskell / haskell/containers

Consider stealing `Data.Vector.accum`

Open
#136 6 comments 0 reactions 0 assignees View on GitHub
feature-request Seq
Dominant language
Haskell
Stars
355
Forks
194
Avg merge
3d 4h
Merged PRs (30d)
4

Description

``` haskell
accum :: (a -> b -> a) -> Seq a -> [(Int, b)] -> Seq a
```

I believe we can get some sharing that could not be obtained using the public API.

We might also consider something like

``` haskell
accumIntMap :: (a -> b -> a) -> Seq a -> IntMap b -> Seq a
```

Another idea that strikes me as interesting would be something combining a `Seq` with a _finger tree_ representation of an `Int` map. Obviously, that doesn't fit so well in `containers`. The moral of that story is that exposing a `Data.Sequence.Internals` module could be interesting.

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.