mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 06:19:44 +08:00
@@ -20,7 +20,7 @@ func main() {
|
||||
// make an Add2 function, give it a name p2, and call it:
|
||||
p2 := Add2()
|
||||
fmt.Printf("Call Add2 for 3 gives: %v\n", p2(3))
|
||||
// make a special Adder function, a gets value 3:
|
||||
// make a special Adder function, a gets value 2:
|
||||
TwoAdder := Adder(2)
|
||||
fmt.Printf("The result is: %v\n", TwoAdder(3))
|
||||
}
|
||||
|
Reference in New Issue
Block a user