<blockquote>
<p><strong>Possible Duplicate:</strong><br/>
<a href="https://stackoverflow.com/questions/373832/what-is-a-lambda-and-what-is-an-example-implementation">What is a lambda and what is an example implementation?</a> </p>
</blockquote>
<p>以下是lambda的代码(来自Python的Byte):</p>
<pre><code>def make_repeater(n):
return lambda s: s * n
twice = make_repeater(2)
print twice('word')
print twice(5)
</code></pre>
<p>输出如下:</p>
^{pr2}$
<p>有人能解释一下lambda是如何长格式工作的吗?在lambda函数中,<code>word</code>和{<cd2>}如何传递给<code>s</code>?在</p>
<p>谢谢。在</p>