g = function(x, y) { global(somelist); rval = x * somelist.f(x, 2*y); return rval; };