Re: Could you explain lambda function to me?

2015-06-02 Thread Chris Kaynor
On Tue, Jun 2, 2015 at 11:14 AM, fl rxjw...@gmail.com wrote: Hi, I see the description of lambda at the online tutorial, but I cannot understand it. '42' is transferred to the function. What 'x' value should be? I do not see it says that it is '0'. And, what is 'x'? The lambda keyword is

Re: Could you explain lambda function to me?

2015-06-02 Thread ast
fl rxjw...@gmail.com a écrit dans le message de news:323866d1-b117-4785-ae24-7d04c49bc...@googlegroups.com... Hi, def make_incrementor(n): ... return lambda x: x + n ... f = make_incrementor(42) f(0) 42 f(1) 43 make_incrementor is a fonction which return a function ! and the

Could you explain lambda function to me?

2015-06-02 Thread fl
Hi, I see the description of lambda at the online tutorial, but I cannot understand it. '42' is transferred to the function. What 'x' value should be? I do not see it says that it is '0'. And, what is 'x'? def make_incrementor(n): ... return lambda x: x + n ... f =