title: Is there a way to reference instance function when calling SequenceType.forEach?
body: <p>Consider type <code>Foo</code>:</p>
  
  <pre><code>class Foo {
  
      var isBaz: Bool {
          return false
      }
  
      func bar() {
          print("some boring print")
      }
  }
  </code></pre>
  
  <p>Now let's say I want to iterate through a collection of class instances and call some function on each of them:</p>
  
  <pre><code>let someFoos: [Foo] = [Foo(), Foo(), Foo()]
  
  someFoos.forEach { $0.bar() }
  </code></pre>
  
  <p>This syntax is quite compact, but it feels a bit awkward. Also, it cannot be used everywhere. For example, in an <code>if</code> statement condition:</p>
  
  <pre><code>if someFoos.contains { $0.isBaz } { 
      // compiler error: statement cannot begin with a closure expression
  }
  
  if someFoos.contains($0.isBaz) { 
      // compiler error: anonymous closure argument not contained in a closure
  }
  
  if someFoos.contains({ $0.isBaz }) { 
      // this is correct, but requires extra pair of parentheses
  }
  </code></pre>
  
  <p>Ideally, it would be nice to write something like</p>
  
  <pre><code>someFoos.forEach(Foo.bar)
  </code></pre>
  
  <p>but as of Swift 2.1 this is not a correct syntax. Such way of referencing the function would be similar to the following:</p>
  
  <pre><code>func bar2(foo: Foo) -&gt; Void {
      print("some boring print")
  }
  
  someFoos.forEach(bar2)
  </code></pre>
  
  <p>Is there a better way to reference instance function? How do you prefer to write such expressions?</p>