Skip to content

Instantly share code, notes, and snippets.

@dce
Created November 14, 2013 19:16
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 dce/7472626 to your computer and use it in GitHub Desktop.
Save dce/7472626 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func make_addr(y int) (func(int) int) {
return func(x int) (int) {
return x + y
}
}
func main() {
add7 := make_addr(7)
fmt.Println("Whoa", add7(3))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment