title: Kotlin: store any type of function reference in a variable
body: <p>Is it possible to have a variable that can holds any type function.</p>
  
  <p>Like :</p>
  
  <pre><code>    fun method1(par: Boolean){}
      fun method2(par: Boolean) : Int{return 1}
      fun method3(par: Boolean, par2: Boolean) : Int{return 1}
  
      var funtionHolder : ((Any)-&gt;Any) ?= null  //What should I write here?? so to hold any type of function
  
     fun method4(){
          .........
          funtionHolder = ::method1  //getting compile time error
          .........
          funtionHolder = ::method2  //getting compile time error
          .........
          funtionHolder = ::method3  //getting compile time error
      }
  </code></pre>
  
  <p>After holding the function_reference I need to invoke it later. So I need to holds it parameter type and state also.</p>