1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-29 18:00:26 +00:00

Add match documentation for & rest pattern

This commit is contained in:
Ian Shehadeh 2022-01-20 09:19:21 -05:00
parent 82688b9a44
commit 6412768000

View File

@ -1678,6 +1678,7 @@
* array or bracket tuple -- an array or bracket tuple will match only if
all of its elements match the corresponding elements in `x`.
Use `& rest` at the end of an array or bracketed tuple to bind all remaining values to `rest`.
* table or struct -- a table or struct will match if all values match with
the corresponding values in `x`.