var f; fun foo(param) { fun f_() { print(param); } f = f_; } foo("param"); f(); # expect: param