title: How do I create a function variable with a variable number of arguments?
body: <p>I've defined a class that holds reference to a function variable, which I've defined like this:</p>
  
  <pre><code>public var funct : (vararg x : View?) -&gt; Unit by Delegates.notNull();
  </code></pre>
  
  <p>When I try to call <code>funct</code> with a variable number of arguments like this <code>funct(v1, v2)</code> it complains that I have too many variables. </p>
  
  <p>How can I create a variable for a function that takes a variable number of arguments?</p>