function positionals(sexps, names) {
        var ret = [];
        if(!sexps.length)
            return ret;
        var i, names_started = false;
        if(!_.isArray(sexps[0])) {
            if(names.length < sexps.length)
                throw "ran out of positional arguments - use names";
            for(i = 0; i < sexps.length; ++i)
                ret.push([names[i], sexps[i]]);
        }
        else for(i = 0; i < sexps.length; ++i) {
            var elem = sexps[i];
            if(names_started) {
                if(!elem[0])
                    throw "all positional arguments must be first";
                ret.push(elem);
            }
            else {
                if(elem[0] !== null) {
                    names_started = true;
                    ret.push(elem);
                }
                else if(names.length-1 < i)
                    throw "ran out of positional arguments - use names";
                else ret.push([names[i], elem[1]]);
            }
        }
        return ret;
    }
// a cheap, incomplete implementation of R positional arguments
a cheap, incomplete implementation of R positional arguments
a cheap incomplete implementation of R positional arguments
function positionals(sexps, names) {
        var ret = [];
        if(!sexps.length)
            return ret;
        var i, names_started = false;
        if(!_.isArray(sexps[0])) {
            if(names.length < sexps.length)
                throw "ran out of positional arguments - use names";
            for(i = 0; i < sexps.length; ++i)
                ret.push([names[i], sexps[i]]);
        }
        else for(i = 0; i < sexps.length; ++i) {
            var elem = sexps[i];
            if(names_started) {
                if(!elem[0])
                    throw "all positional arguments must be first";
                ret.push(elem);
            }
            else {
                if(elem[0] !== null) {
                    names_started = true;
                    ret.push(elem);
                }
                else if(names.length-1 < i)
                    throw "ran out of positional arguments - use names";
                else ret.push([names[i], elem[1]]);
            }
        }
        return ret;
    }
function positionals ( sexps , names ) { var ret = [ ] ; if ( ! sexps . length ) return ret ; var i , names_started = false ; if ( ! _ . isArray ( sexps [ 0 ] ) ) { if ( names . length < sexps . length ) throw "ran out of positional arguments - use names" ; for ( i = 0 ; i < sexps . length ; ++ i ) ret . push ( [ names [ i ] , sexps [ i ] ] ) ; } else for ( i = 0 ; i < sexps . length ; ++ i ) { var elem = sexps [ i ] ; if ( names_started ) { if ( ! elem [ 0 ] ) throw "all positional arguments must be first" ; ret . push ( elem ) ; } else { if ( elem [ 0 ] !== null ) { names_started = true ; ret . push ( elem ) ; } else if ( names . length - 1 < i ) throw "ran out of positional arguments - use names" ; else ret . push ( [ names [ i ] , elem [ 1 ] ] ) ; } } return ret ; }
a cheap, incomplete implementation of R positional arguments
a cheap incomplete implementation of R positional arguments