title: Swift Variadic Closures Syntax?
body: <p>I've read <a href="https://stackoverflow.com/questions/36489500/how-to-use-a-variadic-closure-in-swift">this post</a>, but need a little additional help.</p>
  
  <p>I would like to construct a Closure which takes in a variable amount of Doubles, compares them to a threshold (which is also a Double) and returns a Bool checking if ALL entries were greater than the threshold. The return type should be <code>(Double...) -&gt; Bool</code></p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>func isAllAbove(lower: Double) -&gt; (Double...) -&gt; Bool {
      return {
          var conditions: [Bool] = []
          for i in 0...$0.count {
              conditions.append(lower &lt; $0[i])
          }
          return !conditions.contains(false)
      }
  }
  </code></pre>
  
  <p>However, the compiler complains that</p>
  
  <blockquote>
    <p>Cannot convert return expression of type '(_) -> _' to return type '(Double...) -> Bool'</p>
  </blockquote>
  
  <p>Why is this happening and how can I fix this? Thanks!</p>