Skip to content

Instantly share code, notes, and snippets.

@littlekbt
Created June 29, 2017 06:40
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 littlekbt/e93c6a45dda3d10ff354ef95941409a3 to your computer and use it in GitHub Desktop.
Save littlekbt/e93c6a45dda3d10ff354ef95941409a3 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func bar() string {
return "hoge"
}
func foo(f func() string) string{
return f()
}
func main() {
fmt.Printf(foo(bar))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment