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

View File

@ -0,0 +1 @@
package defer