Say I have a method that returns this.
Vector[ (PkgLine, Tree) ]()
I want to convert this to a List of PkgLines. I want to drop the Tree off. I’m not seeing anything in the scala library that would allow me to do this. Anybody have any simple ideas? Thanks.
If you have a Tupel
t, you can access its first element usingt._1. So with themapoperation, you’re effectively throwing away the trees, and store thePkgLinesdirectly. Then you simply convert theVectortoList.