Adding `filterMap` method
peterszerzo opened this issue · comments
I recently found it useful to have a method that filters and maps a list at the same time, with the following type signature:
filterMap : (a -> ( b, Bool )) -> List a -> List b
The mapped value b
is included in the resulting list if the boolean value returned in the tuple is true.
Does it make sense to include this in the library? If so, I have an implementation ready and happy to issue a PR.
In what sense is this function preferable over http://package.elm-lang.org/packages/elm-lang/core/5.1.1/List#filterMap?
It is not preferable at all, I overlooked :/. Thanks for reviewing the issue report so I can get it out of the way :).