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"
func square() func() int {
var x int
return func() int{
x++
return x*x
func join(srt ...string) string {
res := ""
for _,s := range srt {
fmt.Println(s)
res = res + s + " "
}
return res
}
func main() {
f := square()
fmt.Println(f())
fmt.Println(f())
fmt.Println(f())
// s := []string{"lol","kik"}
fmt.Println(join("lol","kek"))
}