Skip to content

Treeowl map maybe m - #333

Merged
Shimuuar merged 4 commits into
masterfrom
treeowl-mapMaybeM
Oct 12, 2020
Merged

Shimuuar merged 4 commits into
masterfrom
treeowl-mapMaybeM

Conversation

@Shimuuar

Copy link
Copy Markdown
Contributor

This is #226 rebased on top of master and with haddocks. Only think holding #226 is lack of documentation so I think now it's ready to merge.

Fixes #183

treeowl and others added 2 commits October 10, 2020 18:35
Add

```haskell
mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Vector a -> m (Vector b)
imapMaybeM :: Monad m => (Int -> a -> m (Maybe b)) -> Vector a -> m (Vector b)
```

`mapMaybeM` is similar to `wither`, but the stream fusion framework
seems to require that we use a `Monad` constraint rather than an
`Applicative` one to get good performance. `imapMaybeM` is the
indexed variant.

Resolves #183
Comment thread Data/Vector/Generic.hs
Comment thread Data/Vector/Generic.hs Outdated

@lehins lehins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor comments, but otherwise looks great.

@Shimuuar
Shimuuar merged commit 3b79e4f into master Oct 12, 2020
@lehins
lehins deleted the treeowl-mapMaybeM branch September 21, 2021 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mapMaybeM

4 participants