Created
October 25, 2017 04:31
-
-
Save lamarmarshall/889b5eda6030d680ec9867f64b10072b to your computer and use it in GitHub Desktop.
go inline function, closure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
sayname := func() string { | |
return "may name is lamar" | |
} | |
fmt.Printf("%v \n", sayname()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment