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.
31 lines
308 B
31 lines
308 B
5 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
func ForEach(f func(int), arr []int) {
|
||
|
for _, el := range arr {
|
||
|
f(el)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func Add0(nbr int) {
|
||
|
fmt.Println(nbr)
|
||
|
}
|
||
|
|
||
|
func Add1(nbr int) {
|
||
|
fmt.Println(nbr + 1)
|
||
|
}
|
||
|
|
||
|
func Add2(nbr int) {
|
||
|
fmt.Println(nbr + 2)
|
||
|
}
|
||
|
|
||
|
func Add3(nbr int) {
|
||
|
fmt.Println(nbr + 3)
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
}
|