<?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: Functional C#: Using Join and GroupJoin</title>
	<atom:link href="http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Paul Batum</title>
		<link>http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/comment-page-1/#comment-33021</link>
		<dc:creator>Paul Batum</dc:creator>
		<pubDate>Sun, 07 Mar 2010 12:32:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2222#comment-33021</guid>
		<description>I haven&#039;t verified it, but it wouldn&#039;t surprise me if my version (and similarly, Jonas&#039;s) was less efficient. I haven&#039;t investigated how the join operators work under the covers but it certainly seems possible that Mark&#039;s version involves fewer iterations through the list of cars.

Still, hopefully these lists aren&#039;t big and we can go with the easier to read (if perhaps slower) approach :)</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t verified it, but it wouldn&#8217;t surprise me if my version (and similarly, Jonas&#8217;s) was less efficient. I haven&#8217;t investigated how the join operators work under the covers but it certainly seems possible that Mark&#8217;s version involves fewer iterations through the list of cars.</p>
<p>Still, hopefully these lists aren&#8217;t big and we can go with the easier to read (if perhaps slower) approach <img src='http://www.markhneedham.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Elfström</title>
		<link>http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/comment-page-1/#comment-32929</link>
		<dc:creator>Jonas Elfström</dc:creator>
		<pubDate>Fri, 05 Mar 2010 10:08:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2222#comment-32929</guid>
		<description>@Paul nice catch!

@Mark I think that all of us do that a lot more than we realize. Even while commenting on exactly that, I still overcomplicated above. By being kind and posting your code in public you get the power of a thousand pair programmers. It&#039;s great because both you and the readers are being educated.</description>
		<content:encoded><![CDATA[<p>@Paul nice catch!</p>
<p>@Mark I think that all of us do that a lot more than we realize. Even while commenting on exactly that, I still overcomplicated above. By being kind and posting your code in public you get the power of a thousand pair programmers. It&#8217;s great because both you and the readers are being educated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/comment-page-1/#comment-32921</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Fri, 05 Mar 2010 07:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2222#comment-32921</guid>
		<description>@Jonas, Paul - at first glance it looks like you guys are right, I&#039;ve massively overcomplicated those again, d&#039;oh! 

I&#039;m kinda intrigued as to why I&#039;m doing that though - a simpler solution was pointed out for another problem I described a couple of weeks ago as well!</description>
		<content:encoded><![CDATA[<p>@Jonas, Paul &#8211; at first glance it looks like you guys are right, I&#8217;ve massively overcomplicated those again, d&#8217;oh! </p>
<p>I&#8217;m kinda intrigued as to why I&#8217;m doing that though &#8211; a simpler solution was pointed out for another problem I described a couple of weeks ago as well!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Batum</title>
		<link>http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/comment-page-1/#comment-32913</link>
		<dc:creator>Paul Batum</dc:creator>
		<pubDate>Fri, 05 Mar 2010 03:44:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2222#comment-32913</guid>
		<description>I&#039;m also wondering if I&#039;m missing something :)

return years.All(y =&gt; cars.Any(c =&gt; c.Year == y));</description>
		<content:encoded><![CDATA[<p>I&#8217;m also wondering if I&#8217;m missing something <img src='http://www.markhneedham.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>return years.All(y =&gt; cars.Any(c =&gt; c.Year == y));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Elfström</title>
		<link>http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/comment-page-1/#comment-32897</link>
		<dc:creator>Jonas Elfström</dc:creator>
		<pubDate>Thu, 04 Mar 2010 22:00:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2222#comment-32897</guid>
		<description>And in the same spirit:

var areThereMatchingCars = years.All(year =&gt; cars.FirstOrDefault(car =&gt; car.Year == year) == null ? false : true);

Am I missing something here?</description>
		<content:encoded><![CDATA[<p>And in the same spirit:</p>
<p>var areThereMatchingCars = years.All(year =&gt; cars.FirstOrDefault(car =&gt; car.Year == year) == null ? false : true);</p>
<p>Am I missing something here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Elfström</title>
		<link>http://www.markhneedham.com/blog/2010/03/04/functional-c-using-join-and-groupjoin/comment-page-1/#comment-32896</link>
		<dc:creator>Jonas Elfström</dc:creator>
		<pubDate>Thu, 04 Mar 2010 21:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2222#comment-32896</guid>
		<description>Instead of the GroupJoin couldn&#039;t you, in this case, just Select over the years and output a car if there is one?

var newCars = years.Select(year =&gt; cars.FirstOrDefault(car =&gt; car.Year == year) ?? new Car {Year=year, Description=&quot;&quot;});</description>
		<content:encoded><![CDATA[<p>Instead of the GroupJoin couldn&#8217;t you, in this case, just Select over the years and output a car if there is one?</p>
<p>var newCars = years.Select(year =&gt; cars.FirstOrDefault(car =&gt; car.Year == year) ?? new Car {Year=year, Description=&#8221;"});</p>
]]></content:encoded>
	</item>
</channel>
</rss>

