<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.objectsharp.com/cs/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Justin Lee's Technology Blog</title><subtitle type="html">&lt;br /&gt;Languages, Languages, Languages!</subtitle><id>http://www.objectsharp.com/cs/blogs/jlee/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.objectsharp.com/cs/blogs/jlee/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.2">Community Server</generator><updated>2008-05-15T08:36:00Z</updated><entry><title>VSLab - F# Visualization</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/07/17/vslab-f-visualization.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/07/17/vslab-f-visualization.aspx</id><published>2008-07-17T06:08:13Z</published><updated>2008-07-17T06:08:13Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.codeplex.com/vslab"&gt;Visual Studio Lab (VSLab)&lt;/a&gt; exploits the power of F# and its interactive top level to provide an interactive environment similar to MatLab and Mathematica, in which you can easily create Add-ins and interact dynamically with them inside Visual Studio. Moreover, since F# is a compiled language, the final code can be compiled as a standalone application.&lt;br&gt;Goal of the project is to provide the basic infrastructure to turn Visual Studio in VSLab, and a number of addins (called viewlets) used to show data and support development of scientific based applications. &lt;p&gt;Take a look. :) I assure you that you'll be impressed.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=149084" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="F#" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/F_2300_/default.aspx" /></entry><entry><title>Another Reason to use Flash Instead of Silverlight</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/07/01/another-reason-to-use-flash-instead-of-silverlight.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/07/01/another-reason-to-use-flash-instead-of-silverlight.aspx</id><published>2008-07-02T03:40:44Z</published><updated>2008-07-02T03:40:44Z</updated><content type="html">&lt;p&gt;Flash content is finally &lt;a href="http://news.cnet.com/8301-10784_3-9982137-7.html"&gt;searchable&lt;/a&gt; by two of the biggest online search engines on the internet, Google and Yahoo.&lt;/p&gt; &lt;p&gt;One of the biggest disadvantage of using Flash content for your dynamic content is simply because it is not searchable, and now with Adobe's new optimized Adobe Flash Player helping both Google and Yahoo to search and index Flash content, this means that there is no excuse left NOT TO USE FLASH on your web sites.&lt;/p&gt; &lt;p&gt;Note that Microsoft Live Search was not included in this partnership.&lt;/p&gt; &lt;p&gt;Now, for those enthusiastic about writing Silverlight content on the web, might I ask, what is Microsoft going to do about this? Both in its Live Search, making it competitive with Google and Yahoo to search Flash content, and also making Silverlight content searchable too. This is the biggest advantage Adobe Flash has over Silverlight now, and if Microsoft doesn't do anything about it, the web will not be convinced about Silverlight, regardless of the &lt;a href="http://news.cnet.com/Silverlight-to-shine-in-NBCs-Olympics-coverage/2100-1026_3-6238260.html"&gt;amount of &lt;strike&gt;bribing&lt;/strike&gt; promoting they can and will do&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Adobe, we love you and thank you.&lt;/p&gt; &lt;p&gt;To those Silverlight enthusiasts, please get your facts right about Adobe Flash before even bashing Adobe Flash technology. You know who you are.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=148074" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="Silverlight" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/Silverlight/default.aspx" /></entry><entry><title>Blaming the User</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/23/blaming-the-user.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/23/blaming-the-user.aspx</id><published>2008-06-23T15:14:16Z</published><updated>2008-06-23T15:14:16Z</updated><content type="html">&lt;p&gt;Is it better to have a user implicitly learning how an application work easily by discovery, rather than explicitly learning how an application works through training and books?&lt;/p&gt; &lt;p&gt;If something goes wrong with an application, is it really a "problem between the keyboard and the chair"? Or is it because the "User Experience" isn't sufficient or consistent to assist with implicit learning?&lt;/p&gt; &lt;p&gt;Sometimes people in the "Computer Industry" need to think more about the user and how to ease their pain, instead of blaming them and create more pain for them.&lt;/p&gt; &lt;p&gt;I'm always amazed when a user tells me "It just works! Amazing!" instead of "How do you do this?". That's "User Experience" for you.&lt;/p&gt; &lt;p&gt;Think about it.&lt;/p&gt; &lt;p&gt;This is my rant today.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=147067" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="User Experience" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/User+Experience/default.aspx" /></entry><entry><title>Links on F# Quotation</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/15/links-on-f-quotation.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/15/links-on-f-quotation.aspx</id><published>2008-06-16T00:01:52Z</published><updated>2008-06-16T00:01:52Z</updated><content type="html">&lt;p&gt;These are a few links I want to read later on F# Quotations. Quotations are similar to expression trees in C#, but more powerful.&lt;/p&gt; &lt;p&gt;&lt;a href="http://cs.hubfs.net/blogs/tomasp/archive/2006/07/07/413.aspx"&gt;F# - Simple quotations transformation&lt;/a&gt;  &lt;p&gt;&lt;a href="http://devhawk.net/2007/12/19/Practical+F+Parsing+The+Abstract+Syntax+Tree.aspx"&gt;Practical F# Parsing: The Abstract Syntax Tree&lt;/a&gt;  &lt;p&gt;&lt;a href="http://tomasp.net/blog/fsharp-quotation-samples.aspx"&gt;F# Quotations Samples on CodePlex&lt;/a&gt;  &lt;p&gt;&lt;a href="http://tomasp.net/blog/quotvis-reloaded.aspx"&gt;F# quotations visualizer - reloaded!&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://cs.hubfs.net/blogs/f_team/archive/2007/04/07/2662.aspx"&gt;Some Q&amp;amp;A on F# Quotations and LINQ&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=146971" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="F#" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/F_2300_/default.aspx" /></entry><entry><title>MVP Insider - Q &amp;amp; A with Justin Lee</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/09/mvp-insider-q-amp-a-with-justin-lee.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/09/mvp-insider-q-amp-a-with-justin-lee.aspx</id><published>2008-06-09T18:39:21Z</published><updated>2008-06-09T18:39:21Z</updated><content type="html">&lt;p&gt;Well, it seems this month I'm up for being interviewed. &lt;a href="http://blogs.msdn.com/cdndevs/archive/2008/06/09/mvp-insider-q-a-with-justin-lee.aspx"&gt;Here's the link to my interview&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=146345" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="C#" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx" /></entry><entry><title>WPF for Developers and Lead Designers Course</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/27/wpf-for-developers-and-lead-designers-course.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/27/wpf-for-developers-and-lead-designers-course.aspx</id><published>2008-05-27T19:51:26Z</published><updated>2008-05-27T19:51:26Z</updated><content type="html">&lt;p&gt;&lt;a href="http://robburke.net"&gt;Rob Burke&lt;/a&gt; is teaching a WPF training course through Toronto-based consultancy &lt;a href="http://www.objectsharp.com/training/coursedetail.aspx?id=8010"&gt;ObjectSharp&lt;/a&gt;. The course is called “&lt;a href="http://www.objectsharp.com/training/coursedetail.aspx?id=8010"&gt;Windows Presentation Foundation for Developers and Lead Designers&lt;/a&gt;,” and, as the title suggests, it offers a hands-on experience designed to give developers and lead designers the knowledge, background, tips and references they’ll need to build smart client applications using the Windows Presentation Foundation. &lt;p&gt;After &lt;a href="http://robburke.net/2008/04/11/mate-this-is-the-future/"&gt;enjoying the process&lt;/a&gt; of training a team of developers and designers to use WPF, this course is the result of turning that material into a course that we could offer here. &lt;p&gt;The inaugural course offering is currently scheduled for &lt;strong&gt;August 13th-15th&lt;/strong&gt;. If you’re interested in taking part, please find &lt;a href="http://www.objectsharp.com/training/coursedetail.aspx?id=8010"&gt;more information about the course on ObjectSharp’s site&lt;/a&gt;. Also, if August 13th is too long for you to wait, or you’re interested in an on-site course, please contact &lt;a href="mailto:training@objectsharp.com"&gt;Julie James&lt;/a&gt;, ObjectSharp’s Training Manager. &lt;p&gt;&lt;a href="http://robburke.net/2008/05/27/wpf-for-developers-and-lead-designers-course/"&gt;More on Rob Burke&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144474" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="C#" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx" /><category term="User Experience" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/User+Experience/default.aspx" /></entry><entry><title>Pex 0.5 Released</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/25/pex-0-5-released.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/25/pex-0-5-released.aspx</id><published>2008-05-26T00:16:25Z</published><updated>2008-05-26T00:16:25Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;&lt;u&gt;What is Pex?&lt;/u&gt;&lt;/strong&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://research.microsoft.com/projects/pex"&gt;&lt;img src="http://research.microsoft.com/projects/pex/Images/PexWeb.png"&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;strong&gt;Pex generates test inputs &lt;/strong&gt;that cover all, or at least many of the corner cases in your .NET code. These test inputs are plugged into &lt;strong&gt;parameterized&lt;em&gt; &lt;/em&gt;unit test &lt;/strong&gt;that you write. The result is a small unit test suite, where each unit test calls the parameterized unit test with particular test inputs. There is a great &lt;a href="http://research.microsoft.com/pex/default.aspx"&gt;picture on the main Pex page&lt;/a&gt; that illustrates this process. &lt;p&gt;&lt;strong&gt;Pex supports other unit test frameworks &lt;/strong&gt;since the unit tests that Pex generates can be executed by other unit test frameworks without Pex. Pex comes with support for MSTest, the unit test framework of Visual Studio, out of the box. For support for other unit test frameworks, please look at the &lt;a href="http://www.codeplex.com/pex"&gt;Pex Extensions&lt;/a&gt; project. &lt;p&gt;Parameterized unit tests have been around for quite some time already, under several names -- row tests, data-driven tests, theories, etc. &lt;p&gt;What is really unique about &lt;strong&gt;Pex &lt;/strong&gt;is that it &lt;strong&gt;analyzes your .NET code, instruction by instruction&lt;/strong&gt;, to understand what your code is doing. Then, in a fully automatic way, Pex computes relevant test inputs that &lt;strong&gt;trigger the corner cases of the code&lt;/strong&gt;. When you write assertions, Pex will try to come up with test inputs that cause an assertion to fail. &lt;p&gt;&lt;strong&gt;&lt;u&gt;Feedback&lt;/u&gt;&lt;/strong&gt; &lt;p&gt;To ask questions, get help, or just give feedback, please take a look at our &lt;a href="http://research.microsoft.com/pex/community.aspx"&gt;mailing lists&lt;/a&gt;. &lt;p&gt;&lt;strong&gt;&lt;u&gt;Links&lt;/u&gt;&lt;/strong&gt; &lt;p&gt;Homepage: &lt;a title="http://research.microsoft.com/pex/downloads.aspx" href="http://research.microsoft.com/pex"&gt;http://research.microsoft.com/pex&lt;/a&gt; &lt;p&gt;Download: &lt;a title="http://research.microsoft.com/pex/downloads.aspx" href="http://research.microsoft.com/pex/downloads.aspx"&gt;http://research.microsoft.com/pex/downloads.aspx&lt;/a&gt; &lt;p&gt;Nikolai Tillmann's Blog: &lt;a title="http://blogs.msdn.com/nikolait" href="http://blogs.msdn.com/nikolait"&gt;http://blogs.msdn.com/nikolait&lt;/a&gt; &lt;p&gt;Peli de Halleux's Blog: &lt;a title="http://blog.dotnetwiki.org/" href="http://blog.dotnetwiki.org/"&gt;http://blog.dotnetwiki.org/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144352" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="C#" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Release of Microsoft Source Analysis for C#</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/25/release-of-microsoft-source-analysis-for-c.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/25/release-of-microsoft-source-analysis-for-c.aspx</id><published>2008-05-26T00:05:55Z</published><updated>2008-05-26T00:05:55Z</updated><content type="html">&lt;p&gt;Source Analysis, also known as StyleCop, analyzes C# source code to enforce a set of best practice style and consistency rules. &lt;/p&gt; &lt;p&gt;Source Analysis for C# can be downloaded here: &lt;a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis"&gt;https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Source Analysis Blog: &lt;a title="http://blogs.msdn.com/sourceanalysis" href="http://blogs.msdn.com/sourceanalysis"&gt;http://blogs.msdn.com/sourceanalysis&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144351" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="C#" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx" /></entry><entry><title>QuickSort in Functional C#</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/23/quicksort-in-functional-c.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/23/quicksort-in-functional-c.aspx</id><published>2008-05-23T20:44:30Z</published><updated>2008-05-23T20:44:30Z</updated><content type="html">&lt;p&gt;Here's a very simple QuickSort algorithm from &lt;a href="http://en.wikipedia.org/wiki/Quick_Sort"&gt;Wikipedia&lt;/a&gt; written in a very Functional way of C#. Notice that it looks very close to the pseudo-code algorithm shown in Wikipedia. The pivot used is just sequence.First(). You can replace the pivot by some random position if you wish.&lt;br&gt;&lt;/p&gt; &lt;p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; QuickSort&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; sequence) &lt;span class="kwrd"&gt;where&lt;/span&gt; T : IComparable&amp;lt;T&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; !sequence.Any()&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;                       ? sequence&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;                       : ((from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;                           &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;lt; 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                           select x)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                             .QuickSort()&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                         ).Concat(&lt;span class="kwrd"&gt;new&lt;/span&gt;[] { sequence.First() }).Concat((from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                                                                      &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;gt;= 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                                                                      select x).QuickSort());&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I tried making this more fun by using the &lt;a href="http://triplez.mine.nu/blogs/triplez/archive/2007/12/10/recursive-lambda-with-fixed-point-generator.aspx"&gt;Fix Point Generator&lt;/a&gt; which I mentioned previously, and converted that code into a Func&amp;lt;IEnumerable&amp;lt;T&amp;gt;&amp;gt; instead. Here's the code.&lt;/p&gt;
&lt;p&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Func&amp;lt;T, T&amp;gt; Fix&amp;lt;T&amp;gt;(Func&amp;lt;Func&amp;lt;T, T&amp;gt;, Func&amp;lt;T, T&amp;gt;&amp;gt; F)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; x =&amp;gt; F(Fix(F))(x);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main()&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            var quicksort = Fix&amp;lt;IEnumerable&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;&amp;gt;&amp;gt;(&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                qsort =&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                sequence =&amp;gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                !sequence.Any()&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                    ? sequence&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                    : qsort(from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                            &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;lt; 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;                            select x)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                          .Concat(&lt;span class="kwrd"&gt;new&lt;/span&gt;[] { sequence.First() })&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                          .Concat(qsort(from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                                        &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;gt;= 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                                        select x)));&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is a perfect example of how you can use the &lt;a href="http://triplez.mine.nu/blogs/triplez/archive/2007/12/10/recursive-lambda-with-fixed-point-generator.aspx"&gt;Fix Point Generator&lt;/a&gt; to create your recursive functions on the fly. If you want to make it reusable with an extension method, you can easily convert it to the extension method, or a normal method. Personally I feel that using the &lt;a href="http://triplez.mine.nu/blogs/triplez/archive/2007/12/10/recursive-lambda-with-fixed-point-generator.aspx"&gt;Fix Point Generator&lt;/a&gt; is more intuitive and slightly more readable as oppose to the extension method way of doing things.&lt;/p&gt;
&lt;p&gt;One point to note is that the "Concat" extension only accepts an IEnumerable&amp;lt;T&amp;gt; and not a single item. You can solve this by the above, "new[] { sequence.First() }" which is a cleaner way if you don't want to write your own extension method (which you could too).&lt;/p&gt;
&lt;p&gt;Crazy stuff eh?&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144261" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="C#" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Presentation: Practical Functional Programming in C#</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/15/presentation-practical-functional-programming-in-c.aspx" /><id>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/15/presentation-practical-functional-programming-in-c.aspx</id><published>2008-05-15T13:36:00Z</published><updated>2008-05-15T13:36:00Z</updated><content type="html">&lt;p&gt;Here are my slides I've done at &lt;a href="http://www.devteach.com"&gt;DevTeach Toronto 2008&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://triplez.mine.nu/files/folders/justin_lee_presentations/entry2222.aspx"&gt;Download it here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=143956" width="1" height="1"&gt;</content><author><name>jlee</name><uri>http://www.objectsharp.com/cs/members/jlee.aspx</uri></author><category term="Presentations" scheme="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/Presentations/default.aspx" /></entry></feed>