当然这是一个关于数字分类的设想示例,所以很难在各种类型的代码中泛化。
This is of course a contrived example relating to number classification, so it's hard to generalize to different types of code.
要说明代码重用及其含义,我要回过来谈谈先前文章说明代码结构和风格所用的数字分类器。
To illustrate code reuse and its implications, I return to a version of the number classifier that previous installments use to illustrate code structure and style.
要解决数字分类器问题,必须准确辨别如何搜集因子,这意味着必须编写特定代码来遍历数字,从而确定因子。
To solve the number classifier, I had to discern exactly how to gather factors, which in turn means I had to write the specific code to loop through Numbers to determine factors.
应用推荐