We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Filter Positions in a List
Filter Positions in a List
Sort by
recency
|
185 Discussions
|
Please Login in order to post a comment
Thanks! This solution works perfectly. I used it to filter out unnecessary data from my list before I proceed to track paxi shipments more accurately.
It can be done like this too : Range(1,arr.length,2).map(x=>arr(x)).toList
Solution in Ocaml without using builtins function:
Scala one liner: arr.grouped(2).map(_.tail).flatten.toList
Solution in OCaml