Skip to content

Commit e13b3dc

Browse files
authored
Merge pull request #244 from lin-snow/patch-1
fix: correct typo "而不再试" → "而不再是"
2 parents f15fcec + a08a8f4 commit e13b3dc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ch5/ch5-06.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ visitAll := func(items []string) {
101101
}
102102
```
103103

104-
在toposort程序的输出如下所示,它的输出顺序是大多人想看到的固定顺序输出,但是这需要我们多花点心思才能做到。哈希表prepreqs的value是遍历顺序固定的切片,而不再试遍历顺序随机的map,所以我们对prereqs的key值进行排序,保证每次运行toposort程序,都以相同的遍历顺序遍历prereqs。
104+
在toposort程序的输出如下所示,它的输出顺序是大多人想看到的固定顺序输出,但是这需要我们多花点心思才能做到。哈希表prepreqs的value是遍历顺序固定的切片,而不再是遍历顺序随机的map,所以我们对prereqs的key值进行排序,保证每次运行toposort程序,都以相同的遍历顺序遍历prereqs。
105105

106106
```
107107
1: intro to programming
@@ -302,3 +302,4 @@ for i := 0; i < len(dirs); i++ {
302302
```
303303

304304
如果你使用go语句(第八章)或者defer语句(5.8节)会经常遇到此类问题。这不是go或defer本身导致的,而是因为它们都会等待循环结束后,再执行函数值。
305+

0 commit comments

Comments
 (0)