elm-community / elm-community/array-extra

add `indexedFilterMap`

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Elm
Stars
10
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Implement `indexedFilterMap : (Int -> a -> Maybe b) -> ...` as a more performant and convenient alternative to
```elm
Array.indexedMap Tuple.pair
|> Array.filterMap (\( i, el ) -> ...)
```
a "findAll" would then be trivial
```elm
Array.filterMapIndexed (\i el -> ...)
```
Related: https://github.com/elm-community/array-extra/issues/12

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.