mirror of https://github.com/01-edu/public.git
docs(foldint) add funcs to help test
This commit is contained in:
parent
7b50c69f22
commit
2a790ac977
|
@ -18,3 +18,15 @@ func main() {
|
||||||
piscine.FoldInt(Mul, table, ac)
|
piscine.FoldInt(Mul, table, ac)
|
||||||
piscine.FoldInt(Sub, table, ac)
|
piscine.FoldInt(Sub, table, ac)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Add(a, b int) int {
|
||||||
|
return a + b
|
||||||
|
}
|
||||||
|
|
||||||
|
func Mul(a, b int) int {
|
||||||
|
return a * b
|
||||||
|
}
|
||||||
|
|
||||||
|
func Sub(a, b int) int {
|
||||||
|
return a - b
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue