elm-community / array-extra

convenience functions for working with Array

Home Page:http://package.elm-lang.org/packages/elm-community/array-extra/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add `indexedFilterMap`

lue-bird opened this issue · comments

commented

Implement indexedFilterMap : (Int -> a -> Maybe b) -> ... as a more performant and convenient alternative to

Array.indexedMap Tuple.pair
    |> Array.filterMap (\( i, el ) -> ...)

a "findAll" would then be trivial

Array.filterMapIndexed (\i el -> ...)

Related: #12