Skip to content

Instantly share code, notes, and snippets.

@kreshikhin
Created February 6, 2014 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kreshikhin/8852210 to your computer and use it in GitHub Desktop.
Save kreshikhin/8852210 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func add(x, y int, callback func(int)) {
sum := x + y
callback(sum)
}
func main() {
add(2, 3, func(result int){
fmt.Println(result)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment