code: function recursiveCycle(arr, onIteration, onEnd) {
      var i=0;
      function next() {
          if (i >= arr.length) {
              onEnd();
              return;
          }
          var item = arr[i];
          i++;
          onIteration(item, next, onEnd);
      }
      next();
  }
docs: Helper function to walk recursively through arr
  
  @param arr
  @param onIteration
  @param onEnd