3 ms·
>why have named return values (in learnMemory) if you return something different? Probably to avoid declaring the function as `func learnMemory() (int, int)`.
by jdiez17 13y ago
>why have named return values (in learnMemory) if you return something different?
Probably to avoid declaring the function as `func learnMemory() (int, int)`.
>If you didn't have a return statement at all, would the function return the final value of p and q?
No, you have to do that explicitly. You can do `return`, though, which will return the variables whose names match the definition.