References
The video for “References” is in the works!
References allow functions to modify variables directly without copying.
Reference Parameters
Declare a reference parameter with &, pass one with &, and read or write
through it with *:
Swap Function
When to Use References
References are useful when you need to modify the original value, avoid copying large data, or return multiple values.
Previous: Interfaces | Next: Modules