I would like to know how to convert a List[Try[T]] into Try[List[T]] in Scala?
List[Try[T]]
Try[List[T]]
I have tried using an accumulator and folding right but it do
Try(list.map(_.get))
This will return only the first failure, so you need something more complicated if you want to catch all the failures in the list.