title: How can I conform to the Strideable protocol in Swift?
body: <p>I'm trying to remove items from an array inside a For loop. In order to do that, I follow the recommendation <a href="https://stackoverflow.com/questions/25699987/selectively-remove-and-delete-objects-from-a-nsmutablearray-in-swift">here</a> to loop backwards like this:</p>
  
  <pre><code>for (index, bullet:Bullet) in stride(from: bullets!.count - 1, through: 0, by: -1) {
      if(currentTime - bullet.life! &gt; bullet.maxLife){
          bullet.removeFromParent()
          bullets?.removeAtIndex(index)
      }
  }
  </code></pre>
  
  <p>But I'm getting an error</p>
  
  <pre><code>Type '($T12, Bullet)' does not conform to protocol 'Strideable'
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here is the class for the bullet. This is a Cocos2D app, hence the CCDrawNode Type.</p>
  
  <pre><code>import Foundation
  
    class Bullet: CCDrawNode {
    var speed:CGPoint?
    var maxSpeed:CGFloat?
    var angle:CGFloat?
    var life:CGFloat?
    var maxLife:CGFloat = 0.5
  
    init(angle: CGFloat){
      super.init()
      self.drawDot(ccp(0,0), radius: 2, color: CCColor.whiteColor());
  
      self.contentSize = CGSize(width: 4, height: 4)
      self.angle = angle
      maxSpeed = 10
      speed = CGPoint(x: maxSpeed! * CGFloat(sin(angle)), y: maxSpeed! * CGFloat(cos(angle)))
  
    }
  
    override func update(delta: CCTime) {
      self.position.x += speed!.x
      self.position.y += speed!.y
    }
  
  }
  </code></pre>