JS solution using function closures

You could do `var g = i('')` and avoid one level of nesting.