mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 08:20:27 +00:00
Add documentation of @ pattern in match
This commit is contained in:
parent
61769c8f16
commit
5407868620
@ -1637,6 +1637,10 @@
|
||||
* `_` symbol -- the last special case is the `_` symbol, which is a wildcard
|
||||
that will match any value without creating a binding.
|
||||
|
||||
While a symbol pattern will ordinarily match any value, the pattern `(@ <sym>)`,
|
||||
where <sym> is any symbol, will attempt to match `x` against a value
|
||||
already bound to `<sym>`, rather than matching and rebinding it.
|
||||
|
||||
Any other value pattern will only match if it is equal to `x`.
|
||||
```
|
||||
[x & cases]
|
||||
|
Loading…
Reference in New Issue
Block a user