Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treeowl map maybe m #333

Merged
merged 4 commits into from
Oct 12, 2020
Merged

Treeowl map maybe m #333

merged 4 commits into from
Oct 12, 2020

Conversation

Shimuuar
Copy link
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
Data/Vector/Generic.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@lehins lehins left a comment

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 and others added 2 commits October 10, 2020 20:07
Co-authored-by: Alexey Kuleshevich <alexey@kuleshevi.ch>
@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