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++ - rosrun via ssh doesnt start a node properly -

android - questions about switching from C2DM to GCM -

How to resolve Delphi error: Incompatible types: 'PWideChar' and 'Pointer' -