<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Yet Another Lambda Tutorial</title>
	<atom:link href="http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/</link>
	<description>Adventures across space and time with the Python programming language</description>
	<lastBuildDate>Sat, 04 May 2013 20:54:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Sanjay Kannan</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1754</link>
		<dc:creator><![CDATA[Sanjay Kannan]]></dc:creator>
		<pubDate>Sat, 11 Aug 2012 19:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1754</guid>
		<description><![CDATA[I&#039;ve used some hack-ish techniques to create a multi-line lambda (https://github.com/whaatt/Mu) in Python, for those who actually need true anonymous functions. Great tutorial though; I agree that lambda is often misconstrued.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve used some hack-ish techniques to create a multi-line lambda (<a href="https://github.com/whaatt/Mu" rel="nofollow">https://github.com/whaatt/Mu</a>) in Python, for those who actually need true anonymous functions. Great tutorial though; I agree that lambda is often misconstrued.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lefönk</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1653</link>
		<dc:creator><![CDATA[lefönk]]></dc:creator>
		<pubDate>Fri, 13 Jul 2012 16:19:38 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1653</guid>
		<description><![CDATA[&quot;And he finds tutorials that start with examples that are entirely inappropriate for his purposes.&quot; --&gt; Your just so right!
&quot;So, if you are such a programmer — this tutorial is for you.&quot;  --&gt; Thanks! you nailed it!]]></description>
		<content:encoded><![CDATA[<p>&#8220;And he finds tutorials that start with examples that are entirely inappropriate for his purposes.&#8221; &#8211;&gt; Your just so right!<br />
&#8220;So, if you are such a programmer — this tutorial is for you.&#8221;  &#8211;&gt; Thanks! you nailed it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1650</link>
		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Sat, 07 Jul 2012 18:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1650</guid>
		<description><![CDATA[Although, I was confused when the author advised lambdas are about returning things implicitly, then going on to say how lambas are like procedures, which just do work and don&#039;t return anything.]]></description>
		<content:encoded><![CDATA[<p>Although, I was confused when the author advised lambdas are about returning things implicitly, then going on to say how lambas are like procedures, which just do work and don&#8217;t return anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1649</link>
		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Sat, 07 Jul 2012 18:29:51 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1649</guid>
		<description><![CDATA[This article is a most perfect example of how meta data is needed when explaining new concepts. After reading this once I understand lambdas having never worked with one before.]]></description>
		<content:encoded><![CDATA[<p>This article is a most perfect example of how meta data is needed when explaining new concepts. After reading this once I understand lambdas having never worked with one before.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agentultra</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1556</link>
		<dc:creator><![CDATA[agentultra]]></dc:creator>
		<pubDate>Wed, 25 Apr 2012 15:01:50 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1556</guid>
		<description><![CDATA[My favourite introduction was in &lt;a href=&quot;http://www.ccs.neu.edu/home/matthias/BTLS/&quot; rel=&quot;nofollow&quot;&gt;The Little Schemer&lt;/a&gt;. It provides a very logical progression from fundamentals into lambda&#039;s and ends with the Y-Combinator... in an introductory text that, IMO, is really easy to follow (and fun!).

I think Python&#039;s lambda is probably somewhat confusing because of its limitations. For example, you can write the &lt;a href=&quot;http://www.reddit.com/r/programming/comments/2k4eh/y_combinator_in_python/c2k6wk&quot; rel=&quot;nofollow&quot;&gt;Y Combinator in Python&lt;/a&gt; but the limitations of lambda in Python make that a very difficult bit of code to read and understand. In languages with better lambda support (like Javascript, Scheme, Lisp, etc) such concepts are pretty natural.

Lambda is pretty useful for encapsulating procedures related to a single function without exposing them in the namespace of the module. Python&#039;s conventions for working around this limitation are pretty ugly, IMO. One either prefixes such supporting &quot;functions&quot; with an underscore or they exclude them from the __all__ special module-level attribute (otherwise they create more classes or just let such trivial bits of code float freely in their module name space).

Lambda is also pretty useful for expressing alternate control flows irrc, but I think that&#039;s something you can read about in the Seasoned Schemer.]]></description>
		<content:encoded><![CDATA[<p>My favourite introduction was in <a href="http://www.ccs.neu.edu/home/matthias/BTLS/" rel="nofollow">The Little Schemer</a>. It provides a very logical progression from fundamentals into lambda&#8217;s and ends with the Y-Combinator&#8230; in an introductory text that, IMO, is really easy to follow (and fun!).</p>
<p>I think Python&#8217;s lambda is probably somewhat confusing because of its limitations. For example, you can write the <a href="http://www.reddit.com/r/programming/comments/2k4eh/y_combinator_in_python/c2k6wk" rel="nofollow">Y Combinator in Python</a> but the limitations of lambda in Python make that a very difficult bit of code to read and understand. In languages with better lambda support (like Javascript, Scheme, Lisp, etc) such concepts are pretty natural.</p>
<p>Lambda is pretty useful for encapsulating procedures related to a single function without exposing them in the namespace of the module. Python&#8217;s conventions for working around this limitation are pretty ugly, IMO. One either prefixes such supporting &#8220;functions&#8221; with an underscore or they exclude them from the __all__ special module-level attribute (otherwise they create more classes or just let such trivial bits of code float freely in their module name space).</p>
<p>Lambda is also pretty useful for expressing alternate control flows irrc, but I think that&#8217;s something you can read about in the Seasoned Schemer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Ferg</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1374</link>
		<dc:creator><![CDATA[Steve Ferg]]></dc:creator>
		<pubDate>Fri, 09 Mar 2012 03:55:57 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1374</guid>
		<description><![CDATA[James wrote
&lt;blockquote&gt;&gt;&gt; But lambda is so much more than just a keyword in Python for creating anonymous function objects!&lt;/blockquote&gt;
I agree.  I focused on &lt;em&gt;lambda-the-Python-progamming-language-keyword&lt;/em&gt; because that (and its documentation) was the source of the problems that I wanted to address.  In footnote 3, I made a nod to situating that topic in a larger context.  But, well, Alonzo Church was definitely out-of-scope.

But James is right.  And &lt;strong&gt;&quot;lambda &#8212; more than a Python keyword&quot;&lt;/strong&gt; would be a great topic for a post of its own.  Unfortunately, I&#039;m not competent to write it. 

I know that the word &quot;lambda&quot; can refer to a lot of different things.
&lt;ul&gt;
&lt;li&gt;lambda-in-Python, i.e. lambda-the-Python-progamming-language-keyword&lt;/li&gt;
&lt;li&gt;lambda-in-Lisp&lt;/li&gt;
&lt;li&gt;lambda-the-programming-language-concept&lt;/li&gt;
&lt;li&gt;lambda-the-logical-concept&lt;/li&gt;
&lt;li&gt;... &lt;em&gt;etc. etc.&lt;/em&gt; ... &lt;/li&gt;
&lt;/ul&gt;

And I&#039;ve found a few articles:
&lt;ul&gt;

	&lt;li&gt;In wikipedia, what you really want to look at is the article on &lt;a href=&quot;http://en.wikipedia.org/wiki/Anonymous_function&quot; title=&quot;wikipedia ~ anonymous functions&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;anonymous functions&lt;/a&gt;.  And maybe the article on &lt;a href=&quot;http://en.wikipedia.org/wiki/First-class_function&quot; title=&quot;wikipedia ~ first-class functions&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;first-class functions&lt;/a&gt;.&lt;/li&gt;
 
	&lt;li&gt;
Surprisingly, the Wikipedia article on &lt;a href=&quot;http://en.wikipedia.org/wiki/Lambda_%28programming%29&quot; title=&quot;Lambda in programming languages&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;lambda in programming languages&lt;/a&gt; is very weak.    &lt;/li&gt;

	&lt;li&gt;Wikipedia has an &lt;a href=&quot;http://en.wikipedia.org/wiki/Lambda_calculus&quot; title=&quot;Wikipedia - lambda calculus&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;article on the lambda calculus&lt;/a&gt; that will likely be too far afield to be interesting or helpful for most programmers. &lt;/li&gt;

	&lt;li&gt;For the really hardy, there is an article on the &lt;a href=&quot;http://en.wikipedia.org/wiki/Y_combinator&quot; title=&quot;wikipedia ~ Y combinator&quot; rel=&quot;nofollow&quot;&gt;Y combinator&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

But those are encyclopedia articles.  Pretty dry.  What I&#039;d &lt;strong&gt;really&lt;/strong&gt; like to learn more about is what makes programmers like James, who use lambda on a regular basis, love lambda.

So... are there any readers out there who might have recommendations and/or links to books, articles, blog postings, tutorials, or web sites that would help those of us (the ones familiar with lambda only in the context of Python) to see lambda in a larger context?  If so, would you be willing to share them? You can code raw HTML into a comment, so you can code an HTML link by doing something that looks like this:

&lt;code&gt;There is a great introduction to lambda for programmers at &lt;a href=&quot;....&quot;&gt;Lambdas R Us&lt;/a&gt;&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>James wrote</p>
<blockquote><p>&gt;&gt; But lambda is so much more than just a keyword in Python for creating anonymous function objects!</p></blockquote>
<p>I agree.  I focused on <em>lambda-the-Python-progamming-language-keyword</em> because that (and its documentation) was the source of the problems that I wanted to address.  In footnote 3, I made a nod to situating that topic in a larger context.  But, well, Alonzo Church was definitely out-of-scope.</p>
<p>But James is right.  And <strong>&#8220;lambda &mdash; more than a Python keyword&#8221;</strong> would be a great topic for a post of its own.  Unfortunately, I&#8217;m not competent to write it. </p>
<p>I know that the word &#8220;lambda&#8221; can refer to a lot of different things.</p>
<ul>
<li>lambda-in-Python, i.e. lambda-the-Python-progamming-language-keyword</li>
<li>lambda-in-Lisp</li>
<li>lambda-the-programming-language-concept</li>
<li>lambda-the-logical-concept</li>
<li>&#8230; <em>etc. etc.</em> &#8230; </li>
</ul>
<p>And I&#8217;ve found a few articles:</p>
<ul>
<li>In wikipedia, what you really want to look at is the article on <a href="http://en.wikipedia.org/wiki/Anonymous_function" title="wikipedia ~ anonymous functions" target="_blank" rel="nofollow">anonymous functions</a>.  And maybe the article on <a href="http://en.wikipedia.org/wiki/First-class_function" title="wikipedia ~ first-class functions" target="_blank" rel="nofollow">first-class functions</a>.</li>
<li>
Surprisingly, the Wikipedia article on <a href="http://en.wikipedia.org/wiki/Lambda_%28programming%29" title="Lambda in programming languages" target="_blank" rel="nofollow">lambda in programming languages</a> is very weak.    </li>
<li>Wikipedia has an <a href="http://en.wikipedia.org/wiki/Lambda_calculus" title="Wikipedia - lambda calculus" target="_blank" rel="nofollow">article on the lambda calculus</a> that will likely be too far afield to be interesting or helpful for most programmers. </li>
<li>For the really hardy, there is an article on the <a href="http://en.wikipedia.org/wiki/Y_combinator" title="wikipedia ~ Y combinator" rel="nofollow">Y combinator</a>.</li>
</ul>
<p>But those are encyclopedia articles.  Pretty dry.  What I&#8217;d <strong>really</strong> like to learn more about is what makes programmers like James, who use lambda on a regular basis, love lambda.</p>
<p>So&#8230; are there any readers out there who might have recommendations and/or links to books, articles, blog postings, tutorials, or web sites that would help those of us (the ones familiar with lambda only in the context of Python) to see lambda in a larger context?  If so, would you be willing to share them? You can code raw HTML into a comment, so you can code an HTML link by doing something that looks like this:</p>
<p><code>There is a great introduction to lambda for programmers at &lt;a href="...."&gt;Lambdas R Us&lt;/a&gt;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wouter</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1217</link>
		<dc:creator><![CDATA[Wouter]]></dc:creator>
		<pubDate>Fri, 13 Jan 2012 10:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1217</guid>
		<description><![CDATA[I think that a lot of applications of lambda, including you callback examples, are situations in which you want to specify an extra argument to an existing &quot;real&quot; function.

command=lambda: self.printNum(44)) # calls self.printNum with an extra argument (44)

For this, functools provides a function that provides the same functionality: partial

command=partial(self.printNum, 44)

This is less general than lambda: any partial can be rewritten as a lambda statement. partial(func, *args, **kargs) is simply lambda *args, **kargs: func(*args, **kargs). However, partial does not depend on a special syntax that is considered difficult to understand.

IMHO, the remaining use cases for lambda are so limited that &#039;they&#039; might as well remove it from the language.

The alternative would be changing function (and class?) definitions to become proper expressions, eg rewriting def function(args) as function = def(args), but that would have very serious implications for the whole language and might make it more difficult to read/learn rather than easier.]]></description>
		<content:encoded><![CDATA[<p>I think that a lot of applications of lambda, including you callback examples, are situations in which you want to specify an extra argument to an existing &#8220;real&#8221; function.</p>
<p>command=lambda: self.printNum(44)) # calls self.printNum with an extra argument (44)</p>
<p>For this, functools provides a function that provides the same functionality: partial</p>
<p>command=partial(self.printNum, 44)</p>
<p>This is less general than lambda: any partial can be rewritten as a lambda statement. partial(func, *args, **kargs) is simply lambda *args, **kargs: func(*args, **kargs). However, partial does not depend on a special syntax that is considered difficult to understand.</p>
<p>IMHO, the remaining use cases for lambda are so limited that &#8216;they&#8217; might as well remove it from the language.</p>
<p>The alternative would be changing function (and class?) definitions to become proper expressions, eg rewriting def function(args) as function = def(args), but that would have very serious implications for the whole language and might make it more difficult to read/learn rather than easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dac</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1211</link>
		<dc:creator><![CDATA[Dac]]></dc:creator>
		<pubDate>Thu, 12 Jan 2012 16:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1211</guid>
		<description><![CDATA[For me, the most common use case for lambda is when using python&#039;s function programming tools, such as map, reduce, etc.

[sourcecode language=&quot;python&quot; wraplines=&quot;false&quot; collapse=&quot;false&quot;]
class Fraction:
     def __init__(self, num,denom):
        self.num = num
        self.denom = denom

fractions = [Fraction(1,2), Fraction(2,3), Fraction (5,7)]
sum_num = reduce(fractions, lambda x,y:x.num+y.num, 0)
[/sourcecode]

Of course this is a contrived example (why would you need to sum numerators?), but this style of usage is most common for me.]]></description>
		<content:encoded><![CDATA[<p>For me, the most common use case for lambda is when using python&#8217;s function programming tools, such as map, reduce, etc.</p>
<pre class="brush: python; collapse: false; title: ; wrap-lines: false; notranslate">
class Fraction:
     def __init__(self, num,denom):
        self.num = num
        self.denom = denom

fractions = [Fraction(1,2), Fraction(2,3), Fraction (5,7)]
sum_num = reduce(fractions, lambda x,y:x.num+y.num, 0)
</pre>
<p>Of course this is a contrived example (why would you need to sum numerators?), but this style of usage is most common for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agentultra</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1209</link>
		<dc:creator><![CDATA[agentultra]]></dc:creator>
		<pubDate>Thu, 12 Jan 2012 14:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1209</guid>
		<description><![CDATA[An entire programming language can be specified entirely with lambda (providing the implementation is sound... Python&#039;s is rather limiting). See the Y combinator for an example.

While lambda can be confusing for beginning programmers, especially those without a mathematics background, is there any risk in exposing them to the bigger picture in an introductory tutorial? Maybe a footnote?

I just love lambda and wish it was better supported in Python (even though it will probably never be).

Nice article! :)]]></description>
		<content:encoded><![CDATA[<p>An entire programming language can be specified entirely with lambda (providing the implementation is sound&#8230; Python&#8217;s is rather limiting). See the Y combinator for an example.</p>
<p>While lambda can be confusing for beginning programmers, especially those without a mathematics background, is there any risk in exposing them to the bigger picture in an introductory tutorial? Maybe a footnote?</p>
<p>I just love lambda and wish it was better supported in Python (even though it will probably never be).</p>
<p>Nice article! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: youngungjeong</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/#comment-1204</link>
		<dc:creator><![CDATA[youngungjeong]]></dc:creator>
		<pubDate>Thu, 12 Jan 2012 02:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=1000#comment-1204</guid>
		<description><![CDATA[Very interesting and helpful explanation, it was. Thanks for the scratch for my long-been itch.]]></description>
		<content:encoded><![CDATA[<p>Very interesting and helpful explanation, it was. Thanks for the scratch for my long-been itch.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
