[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: A meta function
- From: Grizzly Bear <6grizzlybear@...>
- Date: Fri, 4 Jan 2013 16:55:30 -0800
I'd like to have a meta function, sth. like
function fn_matrix(fn_name, arg_foo)
string2var(fn_name) = function(arg_foo) print(fn_name, arg_foo) end
end
Every time fn_matrix is called, it creates a function of the name fn_name that takes
arg_foo as the first parameter and prints out the function's own name and
arg_foo.
Thanks.
Wei