         }
     }
 
+    /// Implementation for Repeatable
     public func shouldRepeat(count: Int) -> Bool {
         return shouldRepeatBlock(count)
     }
 
+    /// Implementation for OperationDidFinishObserver
     public func operationDidFinish(operation: Operation, errors: [ErrorType]) {
         if self.operation == operation {
             finish(errors)

        })
    }

    public override func execute() {
        if !cancelled {
            operation.addObserver(self)

    }
}

/**
 RepeatableOperation is an Operation subclass which conforms to Repeatable.
 
 It can be used to make an otherwise non-repeatable Operation repeatable. It
 does this by accepting, in addition to the operation instance, a closure
 shouldRepeat. This closure can be used to capture state (such as errors).
 
 When conforming to Repeatable, the closure is executed, passing in the 
 current repeat count.
*/
public class RepeatableOperation<T: Operation>: Operation, OperationDidFinishObserver, Repeatable {

    let operation: T
    let shouldRepeatBlock: Int -> Bool

    /**
     Initialize the RepeatableOperation with an operation and
     shouldRepeat closure.
     
     - parameter [unnamed] operation: the operation instance.
     - parameter shouldRepeat: a closure of type Int -> Bool
    */
    public init(_ operation: T, shouldRepeat: Int -> Bool) {
        self.operation = operation
        self.shouldRepeatBlock = shouldRepeat
