mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 06:19:44 +08:00
拼写错误
This commit is contained in:
@@ -26,7 +26,7 @@ func callback(y int, f func(int, int)) {
|
|||||||
|
|
||||||
The sum of 1 and 2 is: 3
|
The sum of 1 and 2 is: 3
|
||||||
|
|
||||||
将函数作为参数的最好的例子是函数 `strings.InfexFunc()`:
|
将函数作为参数的最好的例子是函数 `strings.IndexFunc()`:
|
||||||
|
|
||||||
该函数的签名是 `func IndexFunc(s string, f func(c int) bool) int`,它的返回值是在函数 `f(c)` 返回 true、-1 或从未返回时的索引值。
|
该函数的签名是 `func IndexFunc(s string, f func(c int) bool) int`,它的返回值是在函数 `f(c)` 返回 true、-1 或从未返回时的索引值。
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user