Skip to content

Instantly share code, notes, and snippets.

@pkazmier
Created March 19, 2013 00:06
Show Gist options
  • Save pkazmier/5192251 to your computer and use it in GitHub Desktop.
Save pkazmier/5192251 to your computer and use it in GitHub Desktop.
Why not move the local statement inside the anonymous function?
function seq.keys(t)
assert_arg(1,t,'table')
local key,value
return function()
key,value = next(t,key)
return key
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment