JS solution using function closures

Isn't this equivalent to `return i('')(p)`?