You are viewing a single comment's thread. Return to all comments →
The .collect Syntactic Sugar version (i.e. imperative style)
for ((a,b) <- arr.zipWithIndex if b % 2 ==1) yield 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 →
The .collect Syntactic Sugar version (i.e. imperative style)
for ((a,b) <- arr.zipWithIndex if b % 2 ==1) yield a