Posted 19 May 2014 - 11:04 PM
Basically, I've created a function that accepts a function as an arguement, and this arguement also has arguements, can this work?
What I'm trying to do is make my API extremely compact, I implemented three different types of writing location methods, such as centre write, or right-side write. Now all of these return a series of keys and values in a table.
What I do for the print version's of these write methods, I get local data = writing method, then print() and then return the data, but I'm aiming to make this even more compact. Can I do something like this function funcName(func(…)) and inside funcName, it uses the arguement func with it's arguements aswell.
So, what I'm aiming to do is do this in all print versions of writing methods, return printAddon(writing_method(arg1, arg2, arg3…)), and this will do everything for you.
Regards,
Augustas
What I'm trying to do is make my API extremely compact, I implemented three different types of writing location methods, such as centre write, or right-side write. Now all of these return a series of keys and values in a table.
What I do for the print version's of these write methods, I get local data = writing method, then print() and then return the data, but I'm aiming to make this even more compact. Can I do something like this function funcName(func(…)) and inside funcName, it uses the arguement func with it's arguements aswell.
So, what I'm aiming to do is do this in all print versions of writing methods, return printAddon(writing_method(arg1, arg2, arg3…)), and this will do everything for you.
Regards,
Augustas