ch5: fix code path

This commit is contained in:
chai2010
2016-01-21 09:58:28 +08:00
parent 3666d2f0e8
commit 20a8cf71b9
7 changed files with 19 additions and 18 deletions

View File

@@ -47,8 +47,8 @@
5.2節的findLinks函數使用了輔助函數visit,遍歷和操作了HTML頁面的所有結點。使用函數值我們可以將遍歷結點的邏輯和操作結點的邏輯分離使得我們可以複用遍歷的邏輯從而對結點進行不同的操作。
<u><i>gopl.io/ch5/outline2</i></u>
```Go
gopl.io/ch5/outline2
// forEachNode針對每個結點x,都會調用pre(x)和post(x)。
// pre和post都是可選的。
// 遍歷孩子結點之前,pre被調用