sd
This commit is contained in:
parent
62ef2b7eb2
commit
83bbe32525
|
|
@ -2,16 +2,15 @@ package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func join(srt ...string) string {
|
func square() func () int {
|
||||||
res := ""
|
var x int
|
||||||
for _,s := range srt {
|
return func() int {
|
||||||
fmt.Println(s)
|
x++
|
||||||
res = res + s + " "
|
return x*x
|
||||||
}
|
}
|
||||||
return res
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// s := []string{"lol","kik"}
|
f := square()
|
||||||
fmt.Println(join("lol","kek"))
|
fmt.Println(f())
|
||||||
|
fmt.Println(f())
|
||||||
}
|
}
|
||||||
1
book_with_bridge/defer/main.go
Normal file
1
book_with_bridge/defer/main.go
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
package defer
|
||||||
Loading…
Reference in New Issue
Block a user