A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
6
Task/Higher-order-functions/Go/higher-order-functions.go
Normal file
6
Task/Higher-order-functions/Go/higher-order-functions.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package main
|
||||
import "fmt"
|
||||
|
||||
func func1(f func(string) string) string { return f("a string") }
|
||||
func func2(s string) string { return "func2 called with " + s }
|
||||
func main() { fmt.Println(func1(func2)) }
|
||||
Loading…
Add table
Add a link
Reference in a new issue