diff options
author | Rob Hoelz <rob@hoelz.ro> | 2013-09-04 11:41:42 +0200 |
---|---|---|
committer | Rob Hoelz <rob@hoelz.ro> | 2013-09-04 11:41:42 +0200 |
commit | 57e0ac7e95a55ede7408a36dc7524649bbc8e4c2 (patch) | |
tree | 2ddc1204cd0b055aaff085c86cddf507895dc4da /lua.html.markdown | |
parent | 6c53c05dcc25e74885411832839aa19ff46ee66a (diff) |
Add another example of function call without parens
Function calls using a table literal as its sole parameter
may also omit parentheses
Diffstat (limited to 'lua.html.markdown')
-rw-r--r-- | lua.html.markdown | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua.html.markdown b/lua.html.markdown index 35d68e9b..9f9fd77b 100644 --- a/lua.html.markdown +++ b/lua.html.markdown @@ -136,6 +136,10 @@ local g; g = function (x) return math.sin(x) end -- Calls with one string param don't need parens: print 'hello' -- Works fine. +-- Calls with one table param don't need parens +-- either (more on tables below): +print {} -- Works fine too. + ---------------------------------------------------- -- 3. Tables. |