This commit is contained in:
Alexander Pivkin 2025-12-28 13:45:51 +03:00
parent 62ef2b7eb2
commit 83bbe32525
2 changed files with 9 additions and 9 deletions

View File

@ -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())
} }

View File

@ -0,0 +1 @@
package defer