What does an ampersand (&) mean in the Swift language?
It works as an inout to make the variable an in-out parameter. In-out means in fact passing value by reference, not by value. And it requires not only to accept value by reference, by also to pass it by reference, so pass it with & – foo(&myVar) instead of just foo(myVar) As you see you … Read more