var f; fun foo(param) { fun f_() { print param; } f = f_; } foo("param"); f(); // out: param