<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>pushbomb &#187; F#</title>
	<atom:link href="http://team.pushbomb.com/category/f/feed/" rel="self" type="application/rss+xml" />
	<link>http://team.pushbomb.com</link>
	<description>tv programmed by the collective</description>
	<lastBuildDate>Tue, 05 Jan 2010 22:49:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='team.pushbomb.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a08732ed34e6814d5a5513fe8cde5696?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>pushbomb &#187; F#</title>
		<link>http://team.pushbomb.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://team.pushbomb.com/osd.xml" title="pushbomb" />
	<atom:link rel='hub' href='http://team.pushbomb.com/?pushpress=hub'/>
		<item>
		<title>Reactive Extensions Now Available &#8211; This is Exciting Work</title>
		<link>http://team.pushbomb.com/2009/11/18/reactive-extensions-now-available-this-is-exciting-work/</link>
		<comments>http://team.pushbomb.com/2009/11/18/reactive-extensions-now-available-this-is-exciting-work/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 13:20:07 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[F#]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Multithreading]]></category>
		<category><![CDATA[Observable]]></category>
		<category><![CDATA[Siverlight]]></category>
		<category><![CDATA[silverlight 3]]></category>
		<category><![CDATA[software as strategic]]></category>
		<category><![CDATA[reactive extensions]]></category>
		<category><![CDATA[rx framework]]></category>
		<category><![CDATA[SilverLight]]></category>

		<guid isPermaLink="false">http://team.pushbomb.com/?p=1918</guid>
		<description><![CDATA[vLabs: Reactive Extensions for .NET (Rx)
&#160;
http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx
&#160;




&#160;

About Rx
Rx is a library for composing asynchronous and event-based programs using observable collections.
The “A” in “AJAX” stand for asynchronous, and indeed modern Web-based and Cloud-based applications are fundamentally asynchronous. In fact, Silverlight bans all blocking networking and threading operations. Asynchronous programming in by no means restricted to Web and Cloud [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1918&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<h3>vLabs: Reactive Extensions for .NET (Rx)</h3>
<p>&nbsp;</p>
<p><a href="http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx">http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx</a></p>
<p>&nbsp;</p>
<div>
<div>
<div><img src="http://i.msdn.microsoft.com/ee794896.DevLabs_Rx_Project%28en-us%29.png" alt="" align="Left" /></div>
</div>
<p>&nbsp;</p>
</div>
<h4>About Rx</h4>
<p>Rx is a library for composing asynchronous and event-based programs using observable collections.</p>
<p>The “A” in “AJAX” stand for asynchronous, and indeed modern Web-based and Cloud-based applications are fundamentally asynchronous. In fact, Silverlight bans all blocking networking and threading operations. Asynchronous programming in by no means restricted to Web and Cloud scenarios, however. Traditional desktop applications also have to maintain responsiveness in the face of long latency IO operations and other expensive background tasks.</p>
<p>Another common attribute of interactive applications, whether Web/Cloud or client-based, is that they are event-driven. The user interacts with the application via a GUI that receives event streams asynchronously from the mouse, keyboard, and other inputs.</p>
<p>Rx is a superset of the standard LINQ sequence operators that exposes asynchronous and event-based computations as push-based, observable  collections via the new .NET 4.0 interfaces IObservable&lt;T&gt; and IObserver&lt;T&gt;.  These are the mathematical dual of the familiar IEnumerable&lt;T&gt; and IEnumerator&lt;T&gt; interfaces for pull-based, enumerable collections in the .NET framework.</p>
<p>The IEnumerable&lt;T&gt; and IEnumerator&lt;T&gt; interfaces allow developers to create reusable abstractions to consume and transform values from a wide range of concrete enumerable collections such as arrays, lists, database tables, and XML documents. Similarly, Rx allows programmers to glue together complex event processing and asynchronous computations using LINQ queries over observable collections such as .NET events and APM-based computations, PFx concurrent Task&lt;T&gt;,  the Windows 7 Sensor and Location APIs, SQL StreamInsight temporal event streams , F# first-class events, and async workflows.</p>
<p>Play with Rx, stress it, evaluate it, and tell us what you think.</p>
<br />Posted in F#, Functional Programming, Linq, Multithreading, Observable, silverlight 3, Siverlight, software as strategic Tagged: reactive extensions, rx framework, SilverLight <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/1918/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/1918/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/1918/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/1918/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/1918/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/1918/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/1918/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/1918/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/1918/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/1918/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1918&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2009/11/18/reactive-extensions-now-available-this-is-exciting-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://i.msdn.microsoft.com/ee794896.DevLabs_Rx_Project%28en-us%29.png" medium="image" />
	</item>
		<item>
		<title>F# : absolute power corrupts absolutely</title>
		<link>http://team.pushbomb.com/2008/10/07/f-absolute-power-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy0/</link>
		<comments>http://team.pushbomb.com/2008/10/07/f-absolute-power-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy0/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 05:36:07 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[F#]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Lambada]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/10/07/f-absolute-power-over-your-code-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy/</guid>
		<description><![CDATA[// F# Tutorial File   sample code to guide you through the primitives of the F# language.  
// For a larger collection of F# samples, see:     http://go.microsoft.com/fwlink/?LinkID=124614<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=998&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f10%2f07%2ff-absolute-power-over-your-code-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f10%2f07%2ff-absolute-power-over-your-code-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<p>&#8230;.but F# removes side-effect corruption so uh.. there goes my analogy&#8230;&#8230;</p>
<p>Starting from scratch with F#? Click <a href="http://blogs.msdn.com/chrsmith/archive/2008/05/02/f-in-20-minutes-part-i.aspx">here</a>.</p>
<p><a href="http://en.wikipedia.org/wiki/Functional_Programming_" target="_blank">Functional programming </a>is so addictive. It reminds me when I could code with no team, no deadline, no broken processes or cultures to navigate. I do hope this becomes a common option for general development or at least C# continues to <em><a href="http://en.wikipedia.org/wiki/Borg_(Star_Trek)" target="_blank">borg </a></em>functional ideas…</p>
<p><a href="http://en.wikipedia.org/wiki/Borg_(Star_Trek)#Assimilation"><br />
</a></p>
<p>For a larger collection of F# samples, see:</p>
<p><a href="http://go.microsoft.com/fwlink/?LinkID=124614">http://go.microsoft.com/fwlink/?LinkID=124614</a></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// F# Tutorial File<br />
//<br />
// This file contains sample code to guide you through the<br />
// primitives of the F# language.<br />
//<br />
// Contents:<br />
//   &#8211; Simple computations<br />
//   &#8211; Functions on integers<br />
//   &#8211; <a href="http://en.wikipedia.org/wiki/Tuples_" target="_blank">Tuples </a><br />
//   &#8211; Booleans<br />
//   &#8211; Strings<br />
//   &#8211; Lists<br />
//   &#8211; Arrays<br />
//   &#8211; More Collections<br />
//   &#8211; Functions<br />
//   &#8211; Types: unions<br />
//   &#8211; Types: records<br />
//   &#8211; Types: classes<br />
//   &#8211; Types: interfaces<br />
//   &#8211; Types: classes with interface implementations<br />
//   &#8211; Printing </span></p>
<p>// Turn on the lightweight syntax<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:blue;">#light </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// open some standard namespaces<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">open</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">System </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Simple computations<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
// Here are some simple computations.  Note how code can be documented<br />
// with &#8216;///&#8217; comments.  Hover over any reference to a variable to<br />
// see its documentation. </span></p>
<p>/// A very simple constant integer<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">int1 = 1 </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// A second very simple constant integer<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">int2 = 2 </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Add two integers<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">int3 = int1 + int2 </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Functions on integers<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>/// A function on integers<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">f x = 2*x*x &#8211; 5*x + 3 </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// The result of a simple computation<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">result = f (int3 + 4) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Another function on integers<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">increment x = x + 1 </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Compute the factorial of an integer<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let rec </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">factorial n =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">if</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">n=0</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">then</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">1</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">else</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">n * factorial (n-1) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Compute the highest-common-factor of two integers<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let rec </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">hcf a b = </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// notice: 2 parameters separated by spaces<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">if</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">a=0</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">then</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">b<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">elif </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">a&lt;b</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">then</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">hcf a (b-a) </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// notice: 2 arguments separated by spaces<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">else</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">hcf (a-b) b<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// note: function arguments are usually space separated<br />
// note: &#8216;let rec&#8217; defines a recursive function </span><br />
// Tuples<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>// A simple tuple of integers<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">pointA = (1, 2, 3) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// A simple tuple of an integer, a string and a double-precision floating point number<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">dataB = (1,</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;fred&#8221;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">, 3.1415) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// A function that swaps the order of two values in a tuple<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Swap (a, b) = (b, a) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Booleans<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>/// A simple boolean value<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">boolean1 =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">true </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// A second simple boolean value<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">boolean2 =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">false </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Compute a new boolean using ands, ors, and nots<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">boolean3 = not boolean1 &amp;&amp; (boolean2 ||</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">false</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Strings<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>/// A simple string<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">stringA  =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;Hello&#8221; </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// A second simple string<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">stringB  =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;world&#8221; </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// &#8220;Hello world&#8221; computed using string concatentation<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">stringC  = stringA +</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8221; &#8220;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">+ stringB </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// &#8220;Hello world&#8221; computed using a .NET library function<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">stringD = String.Join(</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8221; &#8220;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">,[| stringA; stringB |])<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Try re-typing the above line to see intellisense in action<br />
// Note, ctrl-J on (partial) identifiers re-activates it </span></p>
<p>// Functional Lists<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>/// The empty list<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">listA = [ ] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// A list with 3 integers<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">listB = [ 1; 2; 3 ] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// A list with 3 integers, note :: is the &#8216;cons&#8217; operation<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">listC = 1 :: [2; 3] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Compute the sum of a list of integers using a recursive function<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let rec </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">SumList xs =<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">match</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">xs </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">with<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">| [] </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">0<br />
| y::ys </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">y + SumList ys </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Sum of a list<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">listD = SumList [1; 2; 3] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// The list of integers between 1 and 10 inclusive<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">oneToTen = [1..10] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// The squares of the first 10 integers<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">squaresOfOneToTen = [</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">for</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">in</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">0..10</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x*x ] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Mutable Arrays<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>/// Create an array<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">arr = Array.create 4</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;hello&#8221;<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">arr.[1] &lt;-</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;world&#8221;<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">arr.[3] &lt;-</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;don&#8221; </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Compute the length of the array by using an instance method on the array object<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">arrLength = arr.Length </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Extract a sub-array using slicing notation<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">front = arr.[0..2] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// More Collections<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>/// A dictionary with integer keys and string values<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">lookupTable = dict [ (1,</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">"One"</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">); (2,</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">"Two"</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">) ] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">oneString = lookupTable.[1] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// For some other common data structures, see:<br />
//   System.Collections.Generic<br />
//   Microsoft.FSharp.Collections<br />
//   Microsoft.FSharp.Collections.Seq<br />
//   Microsoft.FSharp.Collections.Set<br />
//   Microsoft.FSharp.Collections.Map </span></p>
<p>// Functions<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>/// A function that squares its input<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Square x = x*x </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Map a function across a list of values<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">squares1 = List.map Square [1; 2; 3; 4]<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">squares2 = List.map (</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">fun</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x*x) [1; 2; 3; 4] </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Pipelines<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">squares3 = [1; 2; 3; 4] |&gt; List.map (</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">fun</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x*x)<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">SumOfSquaresUpTo n =<br />
[1..n]<br />
|&gt; List.map Square<br />
|&gt; List.sum </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Types: unions<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">type</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Expr =<br />
| Num</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">of</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">int<br />
| Add</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">of</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Expr * Expr<br />
| Mul </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">of</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Expr * Expr<br />
| Var</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">of</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">string</span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let rec </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Evaluate (env:Map&lt;string,int&gt;) exp =<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">match</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">exp</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">with<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">| Num n</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">n<br />
| Add (x,y)</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Evaluate env x + Evaluate env y<br />
| Mul (x,y)</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Evaluate env x * Evaluate env y<br />
| Var id </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">env.[id]</span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">envA = Map.of_list [</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">"a"</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">,1 ;<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">"b"</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">,2 ;<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">"c"</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">,3 ]</span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">expT1 = Add(Var</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;a&#8221;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">,Mul(Num 2,Var</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;b&#8221;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">))<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">resT1 = Evaluate envA expT1 </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Types: records<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">type</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Card = { Name  : string;<br />
Phone : string;<br />
Ok    : bool }</span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">cardA = { Name =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;Alf&#8221;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">; Phone =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;(206) 555-8257&#8243;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">; Ok =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">false</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">}<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">cardB = { cardA </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">with</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Phone =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;(206) 555-4112&#8243;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">; Ok =</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">true</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">}<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">ShowCard c =<br />
c.Name +</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8221; Phone: &#8220;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">+ c.Phone + (</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">if</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">not c.Ok</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">then &#8221; (unchecked)&#8221; else &#8220;&#8221;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Types: classes<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>/// A 2-dimensional <a href="http://en.wikipedia.org/wiki/Vector" target="_blank">vector</a><br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">type</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Vector2D(dx:float, dy:float) =<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// The pre-computed length of the vector<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">length = sqrt(dx*dx + dy*dy)<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// The displacement along the X-axis<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">member</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">v.DX = dx<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// The displacement along the Y-axis<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">member</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">v.DY = dy<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// The length of the vector<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">member</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">v.Length = length<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Re-scale the vector by a constant<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">member</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">v.Scale(k) = Vector2D(k*dx, k*dy)<br />
</span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Types: interfaces<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">type</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">IPeekPoke =<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">abstract</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Peek: unit</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">int<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">abstract</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Poke: int</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">-&gt;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">unit </span><br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Types: classes with interface implementations<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>/// A widget which counts the number of times it is poked<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">type</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">Widget(initialState:int) =<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// The internal state of the Widget<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let mutable</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">state = initialState </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Implement the IPeekPoke interface<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">interface</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">IPeekPoke </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">with<br />
member</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x.Poke(n) = state &lt;- state + n<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">member</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x.Peek() = state</span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">/// Has the Widget been poked?<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">member</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">x.HasBeenPoked = (state &lt;&gt; 0) </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">widget = Widget(12) :&gt; IPeekPoke </span></p>
<p>widget.Poke(4)<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">let</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">peekResult = widget.Peek() </span><br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Printing<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; </span></p>
<p>// Print an integer<br />
<span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">printfn </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;peekResult = %d&#8221;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">peekResult </span></p>
<p><span style="background:#0a0a0a none repeat scroll 0 0;color:#e388dd;">// Print a result using %A for generic printing<br />
</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">printfn </span><span style="background:#0a0a0a none repeat scroll 0 0;color:#ecc03e;">&#8220;listC = %A&#8221;</span><span style="background:#0a0a0a none repeat scroll 0 0;color:#fffefd;">listC<br />
</span></p>
<h3>Related Posts</h3>
<div class="wlw_related_posts">from tag <a href="http://del.icio.us/damoncarr/F#">F#</a></p>
<ul>
<li><a href="http://code.msdn.microsoft.com/solverfoundationfs1">F# Optimization Modeling Language Utilizing Microsoft Solver Foundation &#8211; Home</a></li>
</ul>
<p>from tag <a href="http://del.icio.us/damoncarr/Lambada">Lambada</a></p>
<ul>
<li><a href="http://blog.domaindotnet.com/2008/07/24/linq-c-30-enumerable-extension-method-reference/">Linq C# 3.0 Enumerable Extension Method Reference « don’t give up on software just yet</a></li>
</ul>
<p><a href="http://del.icio.us/damoncarr/Lambada">(more..)</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4c209aba-3e85-4dd8-8243-04f85f0ad892" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/F%23">F#</a>,<a rel="tag" href="http://technorati.com/tags/Functional+Programming">Functional Programming</a>,<a rel="tag" href="http://technorati.com/tags/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://technorati.com/tags/Lambada">Lambada</a>,<a rel="tag" href="http://technorati.com/tags/.NET+3.5">.NET 3.5</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6535614f-ef02-4125-9080-869f08573498" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/F%23">F#</a>,<a rel="tag" href="http://del.icio.us/popular/Functional+Programming">Functional Programming</a>,<a rel="tag" href="http://del.icio.us/popular/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://del.icio.us/popular/Lambada">Lambada</a>,<a rel="tag" href="http://del.icio.us/popular/.NET+3.5">.NET 3.5</a></div>
<p><a href="http://11011.net/software/vspaste"></a></p>
<div class="wlWriterHeaderFooter" style="text-align:left;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f10%2f07%2ff-absolute-power-over-your-code-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy%2f&amp;title=F%23+%3a+absolute+power+corrupts+absolutely%2c+but+F%23+removes+side-effect+corruption+so+uh..+there+goes+my+analogy"><img style="border:0;" title="Digg This" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<br />Posted in F#, Functional Programming Tagged: .NET 3.5, C# 3.0, F#, Functional Programming, Lambada <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/998/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/998/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/998/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/998/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/998/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/998/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/998/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/998/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/998/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/998/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=998&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/10/07/f-absolute-power-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f10%2f07%2ff-absolute-power-over-your-code-corrupts-absolutely-but-f-removes-side-effect-corruption-so-uh-there-goes-my-analogy%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
	</channel>
</rss>