jhg
This commit is contained in:
parent
b03d18828c
commit
62ef2b7eb2
|
|
@ -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())
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user