You are viewing a single comment's thread. Return to all comments →
You can use collect instead of filter and map.
.collect{case (a,b) if b % 2 == 1 => a}
Seems like cookies are disabled on this browser, please enable them to open this website
Filter Positions in a List
You are viewing a single comment's thread. Return to all comments →
You can use collect instead of filter and map.
.collect{case (a,b) if b % 2 == 1 => a}