sd
This commit is contained in:
parent
62ef2b7eb2
commit
83bbe32525
|
|
@ -2,16 +2,15 @@ package main
|
|||
|
||||
import "fmt"
|
||||
|
||||
func join(srt ...string) string {
|
||||
res := ""
|
||||
for _,s := range srt {
|
||||
fmt.Println(s)
|
||||
res = res + s + " "
|
||||
func square() func () int {
|
||||
var x int
|
||||
return func() int {
|
||||
x++
|
||||
return x*x
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func main() {
|
||||
// s := []string{"lol","kik"}
|
||||
fmt.Println(join("lol","kek"))
|
||||
f := square()
|
||||
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