scala - Functional combinator for filter then map -


i have collection of tuples of type (boolean, a) i'd transform collection of a.

is there known combinator following?

.filter(_._1).map(_._2) 

.collect { case (b, x) if b => x } (filter isn't operation available on functors in general, depends on mean "i have functor on tuple (boolean, a)")


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -