I have long running function that returns a future as follows:
def longRunningFunction(signs: List[String], numOfWords: Int)
: Future[List[(String, Int)]] = Future{ /* computation */ }
I need to reduce the output of the Future as follows:
val all = (6 to 24).map(i => longRunningFunction(signs, i))
.reduce(_ ::: _)
But this does not seem to work. Any thoughts?