title: groovy: how to pass varargs and closure in same time to a method?
body: <p>Given following groovy function:</p>
  
  <pre><code>def foo(List&lt;String&gt; params, Closure c) {...}
  </code></pre>
  
  <p>The method call would be: </p>
  
  <pre><code>foo(['a', 'b', 'c']) { print "bar" }
  </code></pre>
  
  <p>But I would like to get rid of brackets (List) in the function call. something like:</p>
  
  <pre><code>foo('a', 'b') { print "bar" }
  </code></pre>
  
  <p>I cannot change the list parameter to varargs because varargs can be only the last parameter in function (here the closure is the last one). </p>
  
  <p>Any suggestion? </p>