Sequentially combine arbitrary number of futures in Scala
问题 I'm new to scala and I try to combine several Futures in scala 2.10RC3. The Futures should be executed in sequential order. In the document Scala SIP14 the method andThen is defined in order to execute Futures in sequential order. I used this method to combine several Futures (see example below). My expectation was that it prints 6 but actually the result is 0 . What am I doing wrong here? I have two questions: First, why is the result 0 . Second, how can I combine several Futures , so that