In-Out Parameters In Swift Functions
It’s not hard to mutate original provided arguments in functions, it’s just risky sometimes!
4 min readApr 29, 2022
When coding in Swift, we usually don’t need to mutate the arguments that we provide to functions, and then make these changes visible back to the call site. We mostly use them as inputs to calculations or other expressions, and if necessary, we…