mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
315 B
25 lines
315 B
package solutions |
|
|
|
import ( |
|
"fmt" |
|
) |
|
|
|
func thisIsAFunc() { |
|
fmt.Println("This is a function") |
|
} |
|
|
|
var ThisToo = func(s string) { |
|
fmt.Printf("ThisToo prints %s\n", s) |
|
} |
|
|
|
func aux(s string) int { |
|
return 1 |
|
} |
|
|
|
func youCanAlso(f func(string), s string) { |
|
aux := func(s string) int { |
|
return len(s) |
|
} |
|
aux(s) |
|
f(s) |
|
}
|
|
|