     
     // documents already received by the server
     fileprivate var data: [T]
+    
+    fileprivate var position = 0
     
     /// A closure that transforms a document to another type if possible, otherwise `nil`
     typealias Transformer = (Document) -> (T?)

        }
    }
    
    /// Allows you to fetch the first next entity in the Cursor 
    public func next() -> T? {
        if self.data.isEmpty && self.cursorID != 0 {
            // Get more data!
            self.getMore()
        }
        
        return self.data.isEmpty ? nil : self.data.removeFirst()
    }
}


import BSON

/// A Cursor is a pointer to a sequence/collection of Documents on the MongoDB server.
///
/// It can be looped over using a `for let document in cursor` loop like any other sequence.
///
/// It can be transformed into an array with `Array(cursor)` and allows transformation to another type.
