Make a list of the pair (value1, value2) then spli...
# announcements
t
Make a list of the pair (value1, value2) then split it?
d
So then I have a
List<Pair<Value1, Value2>>
. How do I then go to
List<Value1>
and
List<Value2>
without just mapping twice again?
t
But those maps will be cheap, because you're only calling expensiveOperation() once It's possible there's a shorter way, but I can't think of one off the top of my head right now.
i
d
I thought so, too, but no. That partitions according to a condition. I want to create two lists of the same length using two mapper functions