yes.
It’s really important to understand this. The way I think of it, Codea (actually Lua) can only store numbers or strings in variables, so any time you want to store a vec2, a table, a class, a physics object in a variable, Codea just stores the address where that thing can be found.
When you say
function DoSomething(a)
--code
end
Codea treats this as
DoSomething = function(a)
--code
end
ie it stores the code somewhere safe, and puts its memory location in DoSomething
You can see this by printing the following two statements
print(DoSomething) --will print a memory address
print(DoSomething**()**) --will run the function
The first statement just says “print out what is stored in DoSomething”, which is a memory address
The second statement says “run the function whose address is in DoSomething”, because double brackets mean “run the function”