Glossary: Go Beyond the Basics
closure
Also written: closures
A function literal that uses and can change variables from the code around it. `counter()` returns a closure that remembers its own `n`.
Glossary: Go Beyond the Basics
Also written: closures
A function literal that uses and can change variables from the code around it. `counter()` returns a closure that remembers its own `n`.