Skip to content

Commit 0d9d741

Browse files
author
zack
committed
change parameters type to func type
1 parent b968a7f commit 0d9d741

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2.3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ Go里面有一个不错的设计,就是回调函数,有点类似面向对象
385385
}
386386

387387
//声明的函数类型在这个地方当做了一个参数
388-
func filter(slice []int, f test_int) []int {
388+
func filter(slice []int, f testInt) []int {
389389
var result []int
390390
for _, value := range slice {
391391
if f(value) {

0 commit comments

Comments
 (0)