I have the following piece of code:
stringList map copyURLToFile // List[String]
def copyURLToFile(symbol: String) = {
val url = new URL(base.replace("XXX", symbol))
val file = new File(prefix + symbol + ".csv")
org.apache.commons.io.FileUtils.copyURLToFile(url, file)
}
How do I make copyURLToFile execute in parallel?
Scala Futures need a return type, but if I make copyURLToFile of type Future[Unit], what and how do I return from the function?