Reputation: 6432
In Symbol and Operator Reference, the symbol &
is used for:
Links: Match Expressions
Computes the address of a mutable value, for use when interoperating with other languages.
Used in AND patterns.
I've looked at the Match Expressions page but I didn't see any AND patterns. How can I use the &
patterns?
Upvotes: 6
Views: 125
Reputation: 25516
The and pattern syntax looks like the following:
(a, b) & (_, "test")
It is documented here.
Upvotes: 5