<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Performance Within Reach &#187; dotNET</title>
	<atom:link href="http://unmanageability.com/index.php/category/dotnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://unmanageability.com</link>
	<description>Performance Within Reach</description>
	<lastBuildDate>Sat, 17 Jul 2010 19:19:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Filter, Map and Reduce in C Sharp 3.0</title>
		<link>http://unmanageability.com/index.php/2007/07/10/filter-map-and-reduce-in-c-30/</link>
		<comments>http://unmanageability.com/index.php/2007/07/10/filter-map-and-reduce-in-c-30/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 09:21:59 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[dotNET]]></category>
		<category><![CDATA[map reduce]]></category>

		<guid isPermaLink="false">http://blog.codeperformance.com/index.php/2007/07/10/filter-map-and-reduce-in-c-30/</guid>
		<description><![CDATA[Did it with .NET &#8211; A Higher Calling (revisited)
&#8230; already have equivalents in the .NET Framework 3.5.
1. Filter = Where
2. Map = Select
3. Reduce = Aggregate
Each of these are implemented as extension methods for IEnumerable. So, we can rewrite the code like this:

static void Main()
{

var numbers = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
var sum = numbers.Where(x =&#62; (x % 2) == 0).Select(x =&#62; x * x).Aggregate(0, (x, ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://diditwith.net/PermaLink,guid,c28d79df-21e1-4084-8412-065f34c6fad2.aspx">Did it with .NET &#8211; A Higher Calling (revisited)</a></p>
<blockquote><p>&#8230; already have equivalents in the .NET Framework 3.5.</p>
<p>1. Filter = Where</p>
<p>2. Map = Select</p>
<p>3. Reduce = Aggregate</p>
<p>Each of these are implemented as extension methods for IEnumerable. So, we can rewrite the code like this:</p>
<p><em><small><br />
static void Main()<br />
{<br />
</small></em></p></blockquote>
<blockquote><p><em><small>var numbers = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };</small></em><br />
<em><small>var sum = numbers.Where(x =&gt; (x % 2) == 0).Select(x =&gt; x * x).Aggregate(0, (x, y) =&gt; x + y);</small></em><br />
<em><small>    Console.WriteLine(&#8220;Sum: {0}&#8221;, sum);</small></em></p>
<p><em><small>}</small></em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://unmanageability.com/index.php/2007/07/10/filter-map-and-reduce-in-c-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
