That is right.
The first call to timer.performWithDelay()
timer.performWithDelay( 1000, run() )
runs the function immediately and anything returned from it is passed to timer.performWithDelay()
It is equivalent to this (in this scenario):
local retVal = run() timer.performWithDelay( 1000, retVal ) -- retVal is nil in this case
The main thing to remember is you have to pass a reference to a function to timer.performWithDelay().
This is a reference: run
This is you calling the function: run()