This commit is contained in:
a.pivkin 2025-12-28 13:35:36 +03:00
parent b03d18828c
commit 62ef2b7eb2

View File

@ -2,17 +2,16 @@ package main
import "fmt" import "fmt"
func square() func() int { func join(srt ...string) string {
var x int res := ""
return func() int{ for _,s := range srt {
x++ fmt.Println(s)
return x*x res = res + s + " "
} }
return res
} }
func main() { func main() {
f := square() // s := []string{"lol","kik"}
fmt.Println(f()) fmt.Println(join("lol","kek"))
fmt.Println(f())
fmt.Println(f())
} }