Skip to content

Instantly share code, notes, and snippets.

@shockalotti
Created May 27, 2014 08:16
Show Gist options
  • Save shockalotti/59287ca42a196cf76f3b to your computer and use it in GitHub Desktop.
Save shockalotti/59287ca42a196cf76f3b to your computer and use it in GitHub Desktop.
Go Golang - basic Closure example
package main
import "fmt"
func main() {
add := func(x,y int) int {
return x + y
}
fmt.Println(add(1,1))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment