Skip to content

Commit

Permalink
A little extra about ... being weird and not a first-class value.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Jun 28, 2021
1 parent b480bcd commit e8576db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lua-primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ The `...` values also work at the top level of a file. They are
usually used to capture command-line arguments for files run directly
from the command line, but they can also pass on values from a
`dofile` call or tell you the name of the current module in a file
that's loaded from `require`.
that's loaded from `require`. Note that since `...` represents
multiple values it is common to put it in a table to store it, unless
the number of values is known ahead of time:

```fennel
(local (first-arg second-arg) ...)
(local all-args [...])
```

## Lua loading

Expand Down

0 comments on commit e8576db

Please sign in to comment.