• Must declare a func before let func call itself recursively. Otherwise compile error
  • Loop will reuse variable address, so a new variable must be declared to get loop variable value if the value will be used later in closure
    • Must not just pass loop variable to later use, otherwise will just reuse the last value
    • Declare a new variable to get the value if you need use it later

What to read next

Previous / Next
Previous: Go - Functions - 3 Next: Go - Functions - 5 (variadic function, defer)
More like this
Subscribe via RSS: Macro · Tech

Tags:

Updated: