<br><br><div class="gmail_quote">On Tue, Jul 19, 2011 at 11:52 AM, Thomas Jollans <span dir="ltr"><<a href="mailto:t@jollybox.de">t@jollybox.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 19/07/11 00:33, Thomas 'PointedEars' Lahn wrote:<br>
> Thomas 'PointedEars' Lahn wrote:<br>
><br>
>> Dave Angel wrote:<br>
>>> On 01/-10/-28163 02:59 PM, Terry Reedy wrote:<br>
>>>> def makeadder(y)<br>
>>>>     def _add(x): return x+y<br>
>>>> add2 = makeadder(2)<br>
>>><br>
>>> A couple of typos in that code:<br>
>>><br>
>>> def makeaddr(y):<br>
>>>      def _add(x): return x+y<br>
>>>      return _add<br>
>><br>
>> I agree about the `return' statement, but not about the factory name; this<br>
>> has nothing to do with addresses (addr).<br>
><br>
> Supplemental: The above can be simplified to<br>
><br>
> def makeadder(y): return lambda x: x + y<br>
><br>
<br>
</div>In turn:<br>
<br>
makeadder = lambda y: lambda x: x + y<br>
<br>
Smells of Haskell.<br>
<div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a></div></div></blockquote><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Hi All,</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Thanks guys for the reply. I now understand something. Since Im a newbie, let me read over and over so that I will get the complete picture of everyone's idea. :-)</span></div>
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div><br></div><div>Regards,</div><div>Kurian Thayil. </div></span></div><br>