yankay/scala-tour — pull request #5 by jimschubert (2013-08-07 03:51:12+00:00)
Title: Translations for 'Functional' section

Hi Yan.

I've made some adjustments to the English translation of the Functional section. A couple of the English translations ended up being exactly the same but the Chinese looks different (strings are longer); for example; line 381 and line 383 in `project/translate-zh.scala`

Also, I've changed the last line of the Map Reduce section:

`Map and ReduceLeft can replace a for-loop expression, making code cleaner.`

The search/replace I used updated this in multiple places. On line 295 of `project/translate-zh.scala`, I don't see `foldLeft` in the Chinese translation.

On line 305, I did not change `Map和foldLeft可以代替大部分需要for循环的操作，并且使代码更清晰` because I wasn't sure where the word boundary for `foldLeft` is and whether or not this was the proper target of the translation. You *might* want to change `ReduceLeft` on line 304 back to `foldLeft`. If you do this, the site (http://www.scala-tour.com/#/word-count) will not make sense because there's no `foldLeft` on that page. However, it does make sense in the text version.

Thanks.