The touch listener is dispatched somewhere in the guts of Corona, and needs to make do with the limited information it has available. The machinery that sends and delivers events, such as touch, is in a similar boat. The developers decided that a sane way to achieve this, while still allowing for reasonable flexibility, was to pass everything through a table as the first parameter.
So, to answer your second question, you can’t do that because that parameter is already reserved for something else.
Also, the most obvious way to feed your parameter into the function is to call it, but then its action happens immediately. This is where the new function (not yet called, obviously) comes in.
The line in question creates a new, one-parameter function. I gave the parameter the name “event” to emphasize that this one is meant to honor the event listener contract. This is what gets returned from myFunction (because of the return , naturally), and thus added as a listener.
We don’t pass abc as an argument to this one. Rather, Lua sees that it’s using abc, and also available in the function creating it (in this case myFunction ), so it makes a reference to abc’s current value and the new function gets to keep it. (This might be a bit clearer if you follow the link in my previous post.)
Functions are just another object in Lua, and get created like tables or strings. For comparison, the code in your last post is just a nicer syntax Lua gives us for
local myFunction myFunction = function( abc ) print( abc ) end
Luckily we don’t usually have to think about this, but it’s good to know for situations like yours.
Don’t worry if this seems confusing. It really is one of those things that takes a little time, and then it suddenly clicks. 