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

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

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