sd
This commit is contained in:
@@ -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())
|
||||
}
|
||||
Reference in New Issue
Block a user