push all exercices

This commit is contained in:
lbenedar
2026-02-21 14:09:13 +03:00
commit a94d994b8c
72 changed files with 787 additions and 0 deletions

13
ch5/3/ch5_3.go Normal file
View File

@@ -0,0 +1,13 @@
package main
import "fmt"
func prefixer(prefix string) func(string) string {
return func(s string) string { return prefix + " " + s }
}
func main() {
helloPrefix := prefixer("Hello")
fmt.Println(helloPrefix("Bob")) // should print Hello Bob
fmt.Println(helloPrefix("Maria")) // should print Hello Maria
}