title: recursive call Future in scala
body: <pre><code>object future1 {
      def main(args: Array[String]): Unit = {
          def getexecute(i:Int){
              println("start thread "+i)
              Thread.sleep(1000L)
              println("end of thread "+i)
          }       
          var n=10
          println("heelo"+n)
          def execute_future(n:Int):Unit = Future{
              println("hello")
              if(n&lt;1){
                  println("heelo")
                  1
              }           
              else{
                  println("get into future")
                  getexecute(n)
                  execute_future(n-1)
              }
          }
      }
  }
  </code></pre>
  
  <p>I m trying call getexecution method in future recursively but not able to get inside future. May return type is Unit not able to get inside future. How to execute future call recursively?</p>