lib/utils.js
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();
}
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();
}
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 ( ) ; }
Helper function to walk recursively through arr

@param arr
@param onIteration
@param onEnd
Helper function to walk recursively through arr