ประโยคภาษาจีน : 中文句子 |
---|
wǒ men 我们 xū yào 需要 xiě 写 yí gè 一个 hán shù 函数 tā 它 néng gòu 能够 shēng chéng 生成 lěi jiā qì 累加器 jí 即 zhè ge 这个 hán shù 函数 jiē shòu 接受 yí gè 一个 cān shù 参数 rán hòu 然后 fǎn huí 返回 lìng 另 yí gè 一个 hán shù 函数 hòu zhě 后者 jiē shòu 接受 cān shù 参数 rán hòu 然后 fǎn huí 返回 zēng jiā 增加 le 了 hòu 后 de 的 zhí 值 |
We want to write a function that generates accumulators-- a function that takes a number n, and returns a function that takes another number i and returns n incremented by i. |