<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Functional list processing in C# 2.0 with anonymous delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx</link><description>One of the benefits of functional languages is their great flexibility in list manipulation, which enables them to express certain computations concisely that would require one or more verbose loops in procedural languages. Many of the features that functional</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>CodeGator  &amp;raquo; Blog Archive   &amp;raquo; Things I Don&amp;#8217;t Miss in .NET 1.1</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#677856</link><pubDate>Tue, 25 Jul 2006 16:24:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:677856</guid><dc:creator>CodeGator  » Blog Archive   » Things I Don’t Miss in .NET 1.1</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codegator.com/?p=22"&gt;http://www.codegator.com/?p=22&lt;/a&gt;</description></item><item><title>re: Functional list processing in C# 2.0 with anonymous delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#680381</link><pubDate>Thu, 27 Jul 2006 19:01:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:680381</guid><dc:creator>Sergio Arancibia</dc:creator><description>Thanks, this article is enlighting!</description></item><item><title>re: Functional list processing in C# 2.0 with anonymous delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#713032</link><pubDate>Tue, 22 Aug 2006 22:21:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:713032</guid><dc:creator>Michael Sorens</dc:creator><description>Fascinating article--thanks for bringing the art of delegates a little bit easier to grasp. Besides enjoying C# I am also a Perl aficionado, where the map function (called &amp;quot;map&amp;quot; of course) is thoroughly useful.</description></item><item><title>re: Functional list processing in C# 2.0 with anonymous delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#756532</link><pubDate>Sat, 16 Sep 2006 00:10:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:756532</guid><dc:creator>David Johnston</dc:creator><description>Useful stuff indeed - helps me move my functional Python to C#. However, one cannot but feel that C# is missing the boat e.g.&lt;br&gt;&lt;br&gt;Python&lt;br&gt;======&lt;br&gt;&lt;br&gt;class Point:&lt;br&gt; &amp;nbsp; &amp;nbsp;def __init__(self, line): &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; fields = line.split(&amp;quot;,&amp;quot;)&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.values = map(eval,fields) &amp;nbsp;# array of reals&lt;br&gt;&lt;br&gt;C#&lt;br&gt;==&lt;br&gt; &amp;nbsp; class Point&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;{&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public double[] values;&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Point(string line)&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string[] separator = { &amp;quot;,&amp;quot; };&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string[] fields = line.Split(separator, System.StringSplitOptions.RemoveEmptyEntries);&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;List&amp;lt;string&amp;gt; s = new List&amp;lt;string&amp;gt;(fields);&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;List&amp;lt;double&amp;gt; d = s.ConvertAll&amp;lt;double&amp;gt;(delegate(string ss) { return double.Parse(ss); } );&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;values = d.ToArray();&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;}&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Functional list processing in C# 2.0 with anonymous delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#760151</link><pubDate>Mon, 18 Sep 2006 06:45:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:760151</guid><dc:creator>kentcb</dc:creator><description>Excellent article - thanks. I know it was just a (cool) example, but - just in case someone uses it - those FileStreams should be closed:&lt;br&gt;&lt;br&gt;static List&amp;lt;string&amp;gt; GetBigFiles(string directory, int bigLength)&lt;br&gt;{&lt;br&gt; &amp;nbsp; &amp;nbsp;List&amp;lt;string&amp;gt; paths = new List&amp;lt;string&amp;gt;(Directory.GetFiles(directory));&lt;br&gt; &amp;nbsp; &amp;nbsp;return paths.ConvertAll&amp;lt;FileStream&amp;gt;( File.OpenRead )&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.FindAll( delegate(FileStream f) { return f.Length &amp;gt;= bigLength; } )&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.ConvertAll&amp;lt;string&amp;gt;( delegate(FileStream f) { f.Close(); return f.Name; } );&lt;br&gt;}</description></item><item><title>David Leston&amp;#8217;s Dot Net Blog &amp;raquo; Functional List Processing</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#1316421</link><pubDate>Mon, 18 Dec 2006 12:55:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1316421</guid><dc:creator>David Leston’s Dot Net Blog » Functional List Processing</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.davidleston.com/?p=16"&gt;http://www.davidleston.com/?p=16&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>David Leston&amp;#8217;s Dot Net Blog &amp;raquo; Functional List Processing with Anonymous Delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#1316432</link><pubDate>Mon, 18 Dec 2006 12:55:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1316432</guid><dc:creator>David Leston’s Dot Net Blog » Functional List Processing with Anonymous Delegates</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.davidleston.com/?p=17"&gt;http://www.davidleston.com/?p=17&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Things I Don't Miss in .NET 1.1</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#2221384</link><pubDate>Sat, 21 Apr 2007 18:48:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2221384</guid><dc:creator>Martin Cook's Blog</dc:creator><description>&lt;p&gt;This topic could easily be turned into a recurring post. Anyway, I have been fortunate enough to have&lt;/p&gt;
</description></item><item><title>re: Functional list processing in C# 2.0 with anonymous delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#4028070</link><pubDate>Tue, 24 Jul 2007 16:03:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4028070</guid><dc:creator>Nick Sterling</dc:creator><description>&lt;p&gt;This is a massively helpful article.&lt;/p&gt;</description></item><item><title>re: Functional list processing in C# 2.0 with anonymous delegates</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#6801974</link><pubDate>Wed, 19 Dec 2007 06:24:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6801974</guid><dc:creator>Guy Starbuck</dc:creator><description>&lt;p&gt;Excellent post, and a great, clear explanation of some esoteric but powerful stuff.&lt;/p&gt;</description></item><item><title> Developing for Developers Functional list processing in C 2 0 with | Cast Iron Cookware</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#9642488</link><pubDate>Wed, 27 May 2009 01:31:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9642488</guid><dc:creator> Developing for Developers Functional list processing in C 2 0 with | Cast Iron Cookware</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://castironbakeware.info/story.php?title=developing-for-developers-functional-list-processing-in-c-2-0-with"&gt;http://castironbakeware.info/story.php?title=developing-for-developers-functional-list-processing-in-c-2-0-with&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Developing for Developers Functional list processing in C 2 0 with | Quick Diets</title><link>http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx#9714884</link><pubDate>Tue, 09 Jun 2009 13:58:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9714884</guid><dc:creator> Developing for Developers Functional list processing in C 2 0 with | Quick Diets</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://quickdietsite.info/story.php?id=6443"&gt;http://quickdietsite.info/story.php?id=6443&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>