ModScript - Reference function parameters?

Hi! I'm trying to implement in-place mergesort in ModScript. For this, I want to pass a vector by reference, but the validator fails. What am I missing?

def merge( Vector& v, int l, int m, int r) {
    if (l == r) {
        return;
    }

    var vecL = [];
    for (var i = l; i <=m; ++i) {
        vecL.push_back(v[i]);
    }
    
    ...
}

Tags:

Parents Reply Children
No Data