<?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: More missing LINQ operators</title>
	<atom:link href="http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Sun, 19 May 2013 03:22:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Joshua Alden Lewis</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-5728</link>
		<dc:creator>Joshua Alden Lewis</dc:creator>
		<pubDate>Fri, 05 Apr 2013 17:35:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-5728</guid>
		<description>I like that Alternate extension a lot. Have you thought about a version that would multiple list to be interwoven in an alternating fashion as opposed to just 2.</description>
		<content:encoded><![CDATA[<p>I like that Alternate extension a lot. Have you thought about a version that would multiple list to be interwoven in an alternating fashion as opposed to just 2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1934</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Fri, 30 Oct 2009 12:35:57 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1934</guid>
		<description>@Everett

That&#039;s good too!  I thought of Zip, but that was already taken :P  I think &quot;Splice&quot; might be a good term too?</description>
		<content:encoded><![CDATA[<p>@Everett</p>
<p>That&#8217;s good too!  I thought of Zip, but that was already taken <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />   I think &#8220;Splice&#8221; might be a good term too?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Everett Muniz</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1933</link>
		<dc:creator>Everett Muniz</dc:creator>
		<pubDate>Fri, 30 Oct 2009 02:45:46 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1933</guid>
		<description>Thanks for sharing this.  This is pretty incidental but I wonder if a clearer, more accurate name for Alternate would be Interlace.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this.  This is pretty incidental but I wonder if a clearer, more accurate name for Alternate would be Interlace.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarrett Meyer</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1932</link>
		<dc:creator>Jarrett Meyer</dc:creator>
		<pubDate>Fri, 16 Oct 2009 17:20:24 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1932</guid>
		<description>I find myself constantly wanting all of the array operations from Python to be available in .NET (without rewriting them myself).</description>
		<content:encoded><![CDATA[<p>I find myself constantly wanting all of the array operations from Python to be available in .NET (without rewriting them myself).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1931</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Fri, 16 Oct 2009 15:45:59 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1931</guid>
		<description>@Will, @Diogo

The real-life example is a split-join scenario, where the other joined piece is a list of custom items.  It&#039;s a template thing, transforming:

&quot;Hello [blank], today is [blank]&quot; to &quot;Hello Joe, today is Thursday&quot;</description>
		<content:encoded><![CDATA[<p>@Will, @Diogo</p>
<p>The real-life example is a split-join scenario, where the other joined piece is a list of custom items.  It&#8217;s a template thing, transforming:</p>
<p>&#8220;Hello [blank], today is [blank]&#8221; to &#8220;Hello Joe, today is Thursday&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1930</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Fri, 16 Oct 2009 15:04:09 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1930</guid>
		<description>Alternate:
Interesting, yet the example doesn&#039;t seem like a good fit.  As Diogo pointed out, you can simply use String.Join if the alternating value never changes.

Append / Prepend
I really like using the &quot;params&quot; keyword in situations like this.  It allows me to call on a method more naturally and the compiler composes the collection (array) for me.  Plus, in these examples, you would be able to append or prepend multiple values.

e.g.
public static IEnumerable&lt;TSource&gt; Append&lt;TSource&gt;( this IEnumerable&lt;TSource&gt; source, params TSource[] elements )
{
    return source.Concat( elements );
}

var start = new[] { 1, 2, 3 };
var result = new[] { 1, 2, 3, 4, 5 };
start.Append( 4, 5 ).ShouldHaveSameElements( result );

However, I&#039;ve never gone this far.  I&#039;ve been content with Joshua&#039;s suggestion of new[]{x}.</description>
		<content:encoded><![CDATA[<p>Alternate:<br />
Interesting, yet the example doesn&#8217;t seem like a good fit.  As Diogo pointed out, you can simply use String.Join if the alternating value never changes.</p>
<p>Append / Prepend<br />
I really like using the &#8220;params&#8221; keyword in situations like this.  It allows me to call on a method more naturally and the compiler composes the collection (array) for me.  Plus, in these examples, you would be able to append or prepend multiple values.</p>
<p>e.g.<br />
public static IEnumerable<tsource> Append</tsource><tsource>( this IEnumerable</tsource><tsource> source, params TSource[] elements )<br />
{<br />
    return source.Concat( elements );<br />
}</p>
<p>var start = new[] { 1, 2, 3 };<br />
var result = new[] { 1, 2, 3, 4, 5 };<br />
start.Append( 4, 5 ).ShouldHaveSameElements( result );</p>
<p>However, I&#8217;ve never gone this far.  I&#8217;ve been content with Joshua&#8217;s suggestion of new[]{x}.</tsource></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diogo Mafra</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1929</link>
		<dc:creator>Diogo Mafra</dc:creator>
		<pubDate>Fri, 16 Oct 2009 13:24:58 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1929</guid>
		<description>In the first example you could use String.Join:
String.Join(&quot; &quot;, source)

I would like to have an extension method to verify if a string is null or empty ignoring spaces:
(name == null &#124;&#124; name.Trim().Length == 0)</description>
		<content:encoded><![CDATA[<p>In the first example you could use String.Join:<br />
String.Join(&#8221; &#8220;, source)</p>
<p>I would like to have an extension method to verify if a string is null or empty ignoring spaces:<br />
(name == null || name.Trim().Length == 0)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1928</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Fri, 16 Oct 2009 13:12:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1928</guid>
		<description>@Josh

Ha, yeah we use that way too especially in the overloads that take collections, but we just want to work with a single item.  Concat, Union, Except, etc etc.</description>
		<content:encoded><![CDATA[<p>@Josh</p>
<p>Ha, yeah we use that way too especially in the overloads that take collections, but we just want to work with a single item.  Concat, Union, Except, etc etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Flanagan</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1927</link>
		<dc:creator>Joshua Flanagan</dc:creator>
		<pubDate>Fri, 16 Oct 2009 12:18:33 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1927</guid>
		<description>I can see why you would hate the Enumerable.Repeat syntax, but not sure what would drive you to use it (except counting clock cycles).

var oneToFour = ints.Concat(new[]{4});

Not as pretty as Append, but definitely an improvement over Enumerable.Repeat, in my opinion.</description>
		<content:encoded><![CDATA[<p>I can see why you would hate the Enumerable.Repeat syntax, but not sure what would drive you to use it (except counting clock cycles).</p>
<p>var oneToFour = ints.Concat(new[]{4});</p>
<p>Not as pretty as Append, but definitely an improvement over Enumerable.Repeat, in my opinion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Dingwall</title>
		<link>http://lostechies.com/jimmybogard/2009/10/16/more-missing-linq-operators/#comment-1926</link>
		<dc:creator>Richard Dingwall</dc:creator>
		<pubDate>Fri, 16 Oct 2009 09:30:43 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/10/15/more-missing-linq-operators.aspx#comment-1926</guid>
		<description>Nice, someone should get a project going for extra operators like these. Traverse() is another favourite of mine for flattening recursive hierarchies: http://social.msdn.microsoft.com/forums/en-US/linqprojectgeneral/thread/fe3d441d-1e49-4855-8ae8-60068b3ef741/</description>
		<content:encoded><![CDATA[<p>Nice, someone should get a project going for extra operators like these. Traverse() is another favourite of mine for flattening recursive hierarchies: <a href="http://social.msdn.microsoft.com/forums/en-US/linqprojectgeneral/thread/fe3d441d-1e49-4855-8ae8-60068b3ef741/" rel="nofollow">http://social.msdn.microsoft.com/forums/en-US/linqprojectgeneral/thread/fe3d441d-1e49-4855-8ae8-60068b3ef741/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
