<?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/"
		>
<channel>
	<title>Comments on: Refactoring C# Series: Aggregation of IEnumerable</title>
	<atom:link href="http://www.richardbushnell.net/2008/03/02/refactoring-c-series-aggregation-of-ienumerable/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardbushnell.net/2008/03/02/refactoring-c-series-aggregation-of-ienumerable/</link>
	<description></description>
	<lastBuildDate>Thu, 29 Sep 2011 17:23:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: concerned citizen</title>
		<link>http://www.richardbushnell.net/2008/03/02/refactoring-c-series-aggregation-of-ienumerable/comment-page-1/#comment-104</link>
		<dc:creator>concerned citizen</dc:creator>
		<pubDate>Thu, 10 Dec 2009 16:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/03/02/refactoring-c-series-aggregation-of-ienumerable/#comment-104</guid>
		<description>Ruby has a more traditional &#039;reduce&#039; method that can be used instead of the poorly named &#039;inject&#039; method.  Reduce is a bit more consistent with the names other languages use for similar constructs:

Ruby:
list = [1, 3, 5, 7]
list.reduce(0) {&#124;sum, n&#124; sum + n }

Python:
import operator
list = [1, 3, 5, 7]
reduce(operator.add, list)

Common Lisp:
(let ((list &#039;(1 3 5 7)))
  (reduce (lambda (sum n) (+ sum n)) list))

Of course you could also do this in Common Lisp:
(let ((list &#039;(1 3 5 7)))
  (apply #&#039;+ list))

Move over C# ?</description>
		<content:encoded><![CDATA[<p>Ruby has a more traditional &#8216;reduce&#8217; method that can be used instead of the poorly named &#8216;inject&#8217; method.  Reduce is a bit more consistent with the names other languages use for similar constructs:</p>
<p>Ruby:<br />
list = [1, 3, 5, 7]<br />
list.reduce(0) {|sum, n| sum + n }</p>
<p>Python:<br />
import operator<br />
list = [1, 3, 5, 7]<br />
reduce(operator.add, list)</p>
<p>Common Lisp:<br />
(let ((list &#8216;(1 3 5 7)))<br />
  (reduce (lambda (sum n) (+ sum n)) list))</p>
<p>Of course you could also do this in Common Lisp:<br />
(let ((list &#8216;(1 3 5 7)))<br />
  (apply #&#8217;+ list))</p>
<p>Move over C# ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

