title: Swift Playground Error: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
body: <p>Getting the above error with the following code in Playground Xcode 7.1.1:</p>
  
  <pre><code>import Cocoa
  
  func countDivisors(number:Int) -&gt; Int
  {
      var c = 0
      for i in 1 ... number
      {
          if number % i == 0 { ++c }
      }
      return c
  }
  
  func isPrime(number:Int) -&gt; Bool
  {
      return countDivisors(number) == 2
  }
  
  isPrime(2);
  
  for i in 0 ..&lt; 100
  {
      var f:Bool = isPrime(i)
      print("\(i): \(f)")
  }
  </code></pre>
  
  <p>The error occurs on the line</p>
  
  <pre><code>var f:Bool = isPrime(i)
  </code></pre>
  
  <p>I already re-installed Xcode but error still appears. Does anyone know the reason behind this?</p>