From 62ef2b7eb238474510d5f2edaf3ca19bebc6cb5f Mon Sep 17 00:00:00 2001 From: "a.pivkin" Date: Sun, 28 Dec 2025 13:35:36 +0300 Subject: [PATCH] jhg --- book_with_bridge/comon_shit/main.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/book_with_bridge/comon_shit/main.go b/book_with_bridge/comon_shit/main.go index 7ae22ff..3b96bc3 100644 --- a/book_with_bridge/comon_shit/main.go +++ b/book_with_bridge/comon_shit/main.go @@ -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")) } \ No newline at end of file