 # API as cursors.
 class ArrayResult extends IterableResult
     hasNext: ar () -> (@__index < @.length)
-    next: ar (cb) -> cb(null, @[@__proto__.__index++])
+    next: ar (cb) ->
+        nextCbCheck(cb)
+        cb(null, @[@__proto__.__index++])
 
     makeIterable: (response) ->
         for name, method of ArrayResult.prototype

    hasNext: ar () -> !@_endFlag || @_chunks[0]?

    next: ar (cb) ->
        @_cbQueue.push cb
        @_promptNext()


    next: -> throw "Abstract Method"

    each: varar(1, 2, (cb, onFinished) ->
        unless typeof cb is 'function'
            throw new RqlDriverError "First argument to each must be a function."
        if onFinished? and typeof onFinished isnt 'function'
            throw new RqlDriverError "Optional second argument to each must be a function."

        brk = false
        n = =>
            if not brk and @hasNext()
