<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.81 (http://www.squarespace.com/) on Fri, 01 Jun 2012 09:28:27 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Journal</title><link>http://www.simontylercousins.net/journal/</link><description></description><lastBuildDate>Thu, 24 May 2012 10:03:48 +0000</lastBuildDate><copyright></copyright><language>en-GB</language><generator>Squarespace Site Server v5.11.81 (http://www.squarespace.com/)</generator><item><title>Integration Testing with Node.js</title><category>asp.net</category><category>node.js</category><category>testing</category><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Thu, 24 May 2012 07:57:11 +0000</pubDate><link>http://www.simontylercousins.net/journal/2012/5/24/integration-testing-with-nodejs.html</link><guid isPermaLink="false">740536:8686775:16423449</guid><description><![CDATA[<p>One of the joys of enterprise programming is working with legacy applications. Recently I had to update a legacy application to reflect some changes to a third party HTTP API that it relied upon. The third party had published the API specifications but, as is often the case, did not provide an implementation to perform integration tests against. So, I needed to implement a stub for the HTTP API that, in addition to handling the functional API calls, would also have to handle the session management cookies dictated by the specifications.</p>

<p>Fortunately installing Visual Studio 2003, .NET 1.1 and all of the associated service packs gave me plenty of time to consider my options. By the time all the installers had completed I had decided to use <a href="http://nodejs.org/" title="nodejs.org">node.js</a>, implemented and had running my first node.js server using node's <a href="http://expressjs.com/" title="expressjs.com">express</a> web development framework. As it states in the excellent <a href="http://expressjs.com/guide.html" title="expressjs.com/guide.html">express guide</a> and using the command line node package manager <a href="http://npmjs.org/" title="npmjs.org">(npm)</a>, this is as simple as:</p>

<pre><code>// Install express
$ npm install express
// Create server
$ express apistub &amp;&amp; cd apistub
// Install dependence
$ npm install -d
// Run the server
$ node app.js
</code></pre>

<p>To add the API handlers to match the specification required a little extra effort:</p>

<pre><code>// Login API
app.post('/apistub/controllers/ApiLogin/', function(req, res) {
  req.session.identifier = uuid.v4();
  console.log("LoginAPI [%s]", req.session.identifier);
  res.writeHead(404, authenticatedCookie(req.session.identifier));
  res.end();
})

// Logout API
app.post('/home/common/jsp/smlogout.jsp', function(req, res) {
  console.log("LogoutAPI [%s]", req.session.identifier);
  req.session.destroy();
  res.writeHead(302);
  res.end();
});

// Entry API
app.post('/apistub/controllers/:api/', function(req,res) {
  var xmlBaseFolder = 'api\\entry\\';
  var xsdBaseFolder = 'schema\\entry\\';
  handleApiCall(req,res,xmlBaseFolder,xsdBaseFolder);
});

// Exit API
app.post('/exit/controllers/:api/', function(req,res) {
  var xmlBaseFolder = 'api\\exit\\';
  var xsdBaseFolder = 'schema\\exit\\';
  handleApiCall(req,res,xmlBaseFolder,xsdBaseFolder);
});
</code></pre>

<p>The functional APIs send an XML document in the body of the request and return another XML document in the body of the response. Ideally I would like to validate the request XML against the schemas published in the specification. This is where things got tricky. As a .NET developer I am used to having libraries readily to hand to solve such problems. The node runtime is very minimal and XML schema validation is not something you get out-of-the-box.</p>

<p>Eventually I decided to fire-up my newly installed Visual Studio 2003 and create a .NET 1.1 console application that accepted an XML file and XML schema file as arguments and validated the XML against the schema using the usual (circa 2003) .NET libraries. I could then execute the XML validation application from within node like so:</p>

<pre><code>var handleApiCall = function(req,res,xmlBaseFolder,xsdBaseFolder) {
  console.log("%s [%s]", req.params.api, req.session.identifier);
  // Validate session cookie.
  if (req.cookies.smsession != req.session.identifier) {
    res.writeHead(401, notAuthenticatedCookie(req.session.identifier));    
    res.end();
  } else { 
    // Validate request xml against request schema.
    var xmlFile = xmlBaseFolder + req.params.api + 'Request.xml';
    var schemaFile = xsdBaseFolder + req.params.api + 'Request.xsd';
    fs.writeFileSync(xmlFile, req.body.INPUT);
    var child = spawn(validateXml, [xmlFile, schemaFile]);
    child.stdout.on('data', function(data) {
      console.log('stdout: ' + data);
    });
    child.on('exit', function(code){
      if (code == 0) {
        // Request is valid so send response xml.
        var responseXmlFile = 
            xmlBaseFolder + req.params.api + 'Response.xml';
        var responseXml = fs.readFileSync(responseXmlFile);
        res.writeHead(200, authenticatedCookie(req.session.identifier));
        res.end(responseXml);
      } else {
        // Request is invalid so send error xml.
        res.writeHead(500, authenticatedCookie(req.session.identifier));
        res.end(errorInvalidXml);
      }
    });
  }
}
</code></pre>

<p>The response cookies were set using:</p>

<pre><code>var authenticatedCookie = function(identifier) {
  return [['Set-Cookie', 
    'APIAUTHENTICATION=xxxx; APIAUTHORIZATION=xxxx; SMSESSION=' 
    + identifier + 
    '; TEST_STUB']];  
}

var notAuthenticatedCookie = function(identifier) {
  return [['Set-Cookie',
    'APIAUTHENTICATION=xxxx; APIAUTHORIZATION=xxxx; SMSESSION='
    + identifier +
    '; TEST_STUB']];
}
</code></pre>

<p>Job done! Integration testing can proceed using a simple, lightweight, self-contained HTTP server to mimic the behaviour of the third party API. I liked the results and can see it being used for stubbing other HTTP APIs in my landscape.</p>

<p>An alternative .NET only approach would have been to use the shiny new <a href="http://www.asp.net/web-api" title="ASP.NET Web API">ASP.NET Web API</a>. However, this would have introduced .NET 4 dependencies into the legacy application and, at the time of writing, the support for cookies is not good - <a href="http://aspnetwebstack.codeplex.com/SourceControl/network/forks/marcind/marcind/changeset/changes/488e2bcad815" title="aspnetwebstack.codeplex.com">although it is on its way</a>.</p>
]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-16423449.xml</wfw:commentRss></item><item><title>NoOO + NoSQL = Real-time Domain Model</title><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Sun, 06 May 2012 08:26:35 +0000</pubDate><link>http://www.simontylercousins.net/journal/2012/5/6/nooo-nosql-real-time-domain-model.html</link><guid isPermaLink="false">740536:8686775:16146814</guid><description><![CDATA[<!DOCTYPE html>
<html>
  <head>
    <title>Force-Directed Layout</title>
    <!--<script type="text/javascript" src="../../d3.v2.js"></script>-->
    <script type="text/javascript" src="http://www.simontylercousins.net/storage/actors/d3.v2.js"></script>
    <link type="text/css" rel="stylesheet" href="http://www.simontylercousins.net/storage/actors/actors.css"/>
  </head>
  <body>
    <div id="graph"></div>
    <script type="text/javascript" src="http://www.simontylercousins.net/storage/actors/actors.js"></script>
    <p>
The graph above (you will not see anything in IE8 and below) represents a domain model for a power market comprising
settled (past), trading (present) and forecast (future) data. 
</p>
<p>
Each node
in the graph represents something of interest in the market, e.g. energy
production, energy consumption, temperature, wind, energy price, capacity,
flow, dynamic forecast, foreign exchange etc. modelled as a collection of time series data
over a rolling time window.
</p>
<p>
Some of the nodes subscribe to market datastreams and update their
state on receipt of market data messages. Once their state is updated
they notify connected nodes which in turn update their state based on
the newly arrived data. For example, the dynamic forecast nodes would
trigger a recalculation of their market forecast.
</p>
<h3>NoOO (Not Only Object Oriented) + NoSQL</h3>
<p>
OO is supposed by some to be good for domain modelling and a possible implementation for the domain model would be as an object
graph persisted in a relational database. However, inspired by Joe Armstrong's
assertion that Erlang is the most objected oriented language, I opted to implement the domain model as a collection of
message passing actors - this has some very useful consequences.
</p>
<p>
The domain model is concurrent. Updates to a node asynchronously and concurrently trigger updates to other nodes.
</p>
<p>
Each node in the network is the guardian of its own state and
is responsible for its persistence in a document database. Gone are the
complications of ORMs and managing units of work. The persisted state
is eventually consistent, ideal for a domain model being continually updated in real-time where consistency
is a slippery concept.
</p>
<p>
The implementation used F# mailbox processors for the actors and RavenDB for the
document store (a previous post presented the concept for this, but now the implementation is complete). The visualisation uses d3 (hover the nodes to see the labels, click and drag to
rearrange nodes).
</p> 
  </body>
</html>]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-16146814.xml</wfw:commentRss></item><item><title>Evangelising F# Within Your Organisation</title><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Tue, 07 Jun 2011 08:24:54 +0000</pubDate><link>http://www.simontylercousins.net/journal/2011/6/7/evangelising-f-within-your-organisation.html</link><guid isPermaLink="false">740536:8686775:11719776</guid><description><![CDATA[<p>I will be appearing on the Evangelising F# panel tonight at <a href="http://www.meetup.com/FSharpLondon/events/16285720/">F#unctional Londoners Meetup Group<a> hosted by Skillsmatters.</p>]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-11719776.xml</wfw:commentRss></item><item><title>F# in the Enterprise Panel Discussion</title><category>f#</category><category>talk</category><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Mon, 09 May 2011 11:28:19 +0000</pubDate><link>http://www.simontylercousins.net/journal/2011/5/9/f-in-the-enterprise-panel-discussion.html</link><guid isPermaLink="false">740536:8686775:11404492</guid><description><![CDATA[<p>I will be taking part in the Community for F# live meeting panel discussion on F# in the Enterprise on 17/05/2011. For the details go <a href="http://www.communityforfsharp.net/may-2011-live-meeting">here</a>.</p>]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-11404492.xml</wfw:commentRss></item><item><title>The AV Voting System in F#</title><category>f#</category><category>functional programming</category><category>talks</category><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Fri, 06 May 2011 07:48:19 +0000</pubDate><link>http://www.simontylercousins.net/journal/2011/5/6/the-av-voting-system-in-f.html</link><guid isPermaLink="false">740536:8686775:11378768</guid><description><![CDATA[<script type="text/javascript" src="http://www.simontylercousins.net/storage/tips.js"></script>

<p>I had some requests to publish the code for the AV Voting System that I presented at the start of my last talk at <a href="http://skillsmatter.com/podcast/scala/functional-londoners-may-meetup/js-1750">F#unctional Londoners</a>. This is the code I wrote when I got bored writing slides for the talk. It is representative of the kind of code I write when I am exploring a problem for the first time using F#. Note that the model is used more for me to think about the shape of the data involved; it is not used explicitly by the code itself. This low-ceremony, low committment approach to modelling is ideal for exploratory programming. It allows me to cut-to-the-chase and explore the algorithm without delay. Combine this with the REPL (F# interative) and I have a very productive enviroment in which to play.</p>
<p>This code has bugs but has served its purpose by revealing a rather nice recursive approach to implementing voting systems. Hopefully more illuminating than the rather disappointing level of debate we had on the same subject leading up to the recent <a href="http://www.guardian.co.uk/commentisfree/2011/may/05/av-vote-lib-dems">referendum</a> in the UK.</p>

<pre class="fssnip">
<span class="l"> 1: </span><span class="c">//</span><span class="c"> </span><span class="c">The</span><span class="c"> </span><span class="c">Model</span>
<span class="l"> 2: </span>
<span class="l"> 3: </span><span class="k">type</span> <span class="i">Candidate</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst1001', 1)" onmouseover="showTip(event, 'fst1001', 1)" class="i">string</span>
<span class="l"> 4: </span><span class="k">type</span> <span onmouseout="hideTip(event, 'fst1002', 2)" onmouseover="showTip(event, 'fst1002', 2)" class="i">Preference</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst1003', 3)" onmouseover="showTip(event, 'fst1003', 3)" class="i">int</span>
<span class="l"> 5: </span><span class="k">type</span> <span onmouseout="hideTip(event, 'fst1004', 4)" onmouseover="showTip(event, 'fst1004', 4)" class="i">Vote</span> <span class="o">=</span> (<span onmouseout="hideTip(event, 'fst1005', 5)" onmouseover="showTip(event, 'fst1005', 5)" class="i">Candidate</span> <span class="o">*</span> <span onmouseout="hideTip(event, 'fst1002', 6)" onmouseover="showTip(event, 'fst1002', 6)" class="i">Preference</span>) <span onmouseout="hideTip(event, 'fst1006', 7)" onmouseover="showTip(event, 'fst1006', 7)" class="i">list</span>
<span class="l"> 6: </span><span class="k">type</span> <span onmouseout="hideTip(event, 'fst1007', 8)" onmouseover="showTip(event, 'fst1007', 8)" class="i">Election</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst1004', 9)" onmouseover="showTip(event, 'fst1004', 9)" class="i">Vote</span> <span onmouseout="hideTip(event, 'fst1006', 10)" onmouseover="showTip(event, 'fst1006', 10)" class="i">list</span>
<span class="l"> 7: </span>
<span class="l"> 8: </span><span class="c">//</span><span class="c"> </span><span class="c">The</span><span class="c"> </span><span class="c">Code</span>
<span class="l"> 9: </span>
<span class="l">10: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst1008', 11)" onmouseover="showTip(event, 'fst1008', 11)" class="i">partitionCandidates</span> <span onmouseout="hideTip(event, 'fst1009', 12)" onmouseover="showTip(event, 'fst1009', 12)" class="i">result</span> <span class="o">=</span>
<span class="l">11: </span>    <span class="k">let</span> _,<span onmouseout="hideTip(event, 'fst10010', 13)" onmouseover="showTip(event, 'fst10010', 13)" class="i">losingPercentage</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10011', 14)" onmouseover="showTip(event, 'fst10011', 14)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10012', 15)" onmouseover="showTip(event, 'fst10012', 15)" class="i">minBy</span> (<span class="k">fun</span> (<span onmouseout="hideTip(event, 'fst10013', 16)" onmouseover="showTip(event, 'fst10013', 16)" class="i">c</span>,<span onmouseout="hideTip(event, 'fst10014', 17)" onmouseover="showTip(event, 'fst10014', 17)" class="i">p</span>) <span class="k">-&gt;</span> <span onmouseout="hideTip(event, 'fst10014', 18)" onmouseover="showTip(event, 'fst10014', 18)" class="i">p</span>) <span onmouseout="hideTip(event, 'fst1009', 19)" onmouseover="showTip(event, 'fst1009', 19)" class="i">result</span>
<span class="l">12: </span>    <span onmouseout="hideTip(event, 'fst10011', 20)" onmouseover="showTip(event, 'fst10011', 20)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10015', 21)" onmouseover="showTip(event, 'fst10015', 21)" class="i">partition</span> (<span class="k">fun</span> (<span onmouseout="hideTip(event, 'fst10013', 22)" onmouseover="showTip(event, 'fst10013', 22)" class="i">c</span>,<span onmouseout="hideTip(event, 'fst10014', 23)" onmouseover="showTip(event, 'fst10014', 23)" class="i">p</span>) <span class="k">-&gt;</span> <span onmouseout="hideTip(event, 'fst10014', 24)" onmouseover="showTip(event, 'fst10014', 24)" class="i">p</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10010', 25)" onmouseover="showTip(event, 'fst10010', 25)" class="i">losingPercentage</span>) <span onmouseout="hideTip(event, 'fst1009', 26)" onmouseover="showTip(event, 'fst1009', 26)" class="i">result</span>
<span class="l">13: </span>    <span class="o">|&gt;</span> (<span class="k">fun</span> (<span onmouseout="hideTip(event, 'fst10016', 27)" onmouseover="showTip(event, 'fst10016', 27)" class="i">ls</span>, <span onmouseout="hideTip(event, 'fst10017', 28)" onmouseover="showTip(event, 'fst10017', 28)" class="i">ws</span>) <span class="k">-&gt;</span> <span onmouseout="hideTip(event, 'fst10011', 29)" onmouseover="showTip(event, 'fst10011', 29)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10018', 30)" onmouseover="showTip(event, 'fst10018', 30)" class="i">unzip</span> <span class="i">ls</span> <span class="o">|&gt;</span> <span onmouseout="hideTip(event, 'fst10019', 31)" onmouseover="showTip(event, 'fst10019', 31)" class="i">fst</span>, <span onmouseout="hideTip(event, 'fst10011', 32)" onmouseover="showTip(event, 'fst10011', 32)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10018', 33)" onmouseover="showTip(event, 'fst10018', 33)" class="i">unzip</span> <span onmouseout="hideTip(event, 'fst10017', 34)" onmouseover="showTip(event, 'fst10017', 34)" class="i">ws</span> <span class="o">|&gt;</span> <span onmouseout="hideTip(event, 'fst10019', 35)" onmouseover="showTip(event, 'fst10019', 35)" class="i">fst</span>)
<span class="l">14: </span>
<span class="l">15: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10020', 36)" onmouseover="showTip(event, 'fst10020', 36)" class="i">remove</span> <span onmouseout="hideTip(event, 'fst10021', 37)" onmouseover="showTip(event, 'fst10021', 37)" class="i">losers</span> <span onmouseout="hideTip(event, 'fst10022', 38)" onmouseover="showTip(event, 'fst10022', 38)" class="i">election</span> <span class="o">=</span>
<span class="l">16: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10023', 39)" onmouseover="showTip(event, 'fst10023', 39)" class="i">isLosing</span> <span onmouseout="hideTip(event, 'fst10024', 40)" onmouseover="showTip(event, 'fst10024', 40)" class="i">candidate</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10011', 41)" onmouseover="showTip(event, 'fst10011', 41)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10025', 42)" onmouseover="showTip(event, 'fst10025', 42)" class="i">exists</span> (<span class="k">fun</span> <span onmouseout="hideTip(event, 'fst10026', 43)" onmouseover="showTip(event, 'fst10026', 43)" class="i">loser</span> <span class="k">-&gt;</span> <span onmouseout="hideTip(event, 'fst10024', 44)" onmouseover="showTip(event, 'fst10024', 44)" class="i">candidate</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10026', 45)" onmouseover="showTip(event, 'fst10026', 45)" class="i">loser</span>) <span onmouseout="hideTip(event, 'fst10021', 46)" onmouseover="showTip(event, 'fst10021', 46)" class="i">losers</span>
<span class="l">17: </span>    <span onmouseout="hideTip(event, 'fst10011', 47)" onmouseover="showTip(event, 'fst10011', 47)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10027', 48)" onmouseover="showTip(event, 'fst10027', 48)" class="i">map</span> (<span onmouseout="hideTip(event, 'fst10011', 49)" onmouseover="showTip(event, 'fst10011', 49)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10028', 50)" onmouseover="showTip(event, 'fst10028', 50)" class="i">filter</span> (<span class="k">fun</span> (<span onmouseout="hideTip(event, 'fst10029', 51)" onmouseover="showTip(event, 'fst10029', 51)" class="i">c</span>,_) <span class="k">-&gt;</span> <span onmouseout="hideTip(event, 'fst10030', 52)" onmouseover="showTip(event, 'fst10030', 52)" class="i">not</span> <span class="o">&lt;|</span> <span onmouseout="hideTip(event, 'fst10023', 53)" onmouseover="showTip(event, 'fst10023', 53)" class="i">isLosing</span> <span onmouseout="hideTip(event, 'fst10029', 54)" onmouseover="showTip(event, 'fst10029', 54)" class="i">c</span>)) <span onmouseout="hideTip(event, 'fst10022', 55)" onmouseover="showTip(event, 'fst10022', 55)" class="i">election</span>
<span class="l">18: </span>
<span class="l">19: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10031', 56)" onmouseover="showTip(event, 'fst10031', 56)" class="i">firstPreference</span> <span onmouseout="hideTip(event, 'fst10032', 57)" onmouseover="showTip(event, 'fst10032', 57)" class="i">vote</span> <span class="o">=</span>
<span class="l">20: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10033', 58)" onmouseover="showTip(event, 'fst10033', 58)" class="i">min</span> <span onmouseout="hideTip(event, 'fst10034', 59)" onmouseover="showTip(event, 'fst10034', 59)" class="i">cp1</span> <span onmouseout="hideTip(event, 'fst10035', 60)" onmouseover="showTip(event, 'fst10035', 60)" class="i">cp2</span> <span class="o">=</span> <span class="k">if</span> (<span onmouseout="hideTip(event, 'fst10036', 61)" onmouseover="showTip(event, 'fst10036', 61)" class="i">snd</span> <span onmouseout="hideTip(event, 'fst10035', 62)" onmouseover="showTip(event, 'fst10035', 62)" class="i">cp2</span>) <span class="o">&lt;</span> (<span onmouseout="hideTip(event, 'fst10036', 63)" onmouseover="showTip(event, 'fst10036', 63)" class="i">snd</span> <span onmouseout="hideTip(event, 'fst10034', 64)" onmouseover="showTip(event, 'fst10034', 64)" class="i">cp1</span>) <span class="k">then</span> <span onmouseout="hideTip(event, 'fst10035', 65)" onmouseover="showTip(event, 'fst10035', 65)" class="i">cp2</span> <span class="k">else</span> <span onmouseout="hideTip(event, 'fst10034', 66)" onmouseover="showTip(event, 'fst10034', 66)" class="i">cp1</span>
<span class="l">21: </span>    <span onmouseout="hideTip(event, 'fst10011', 67)" onmouseover="showTip(event, 'fst10011', 67)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10037', 68)" onmouseover="showTip(event, 'fst10037', 68)" class="i">fold</span> <span onmouseout="hideTip(event, 'fst10033', 69)" onmouseover="showTip(event, 'fst10033', 69)" class="i">min</span> (<span class="s">&quot;</span><span class="s">&quot;</span>, <span onmouseout="hideTip(event, 'fst10038', 70)" onmouseover="showTip(event, 'fst10038', 70)" class="i">System</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10039', 71)" onmouseover="showTip(event, 'fst10039', 71)" class="i">Int32</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10040', 72)" onmouseover="showTip(event, 'fst10040', 72)" class="i">MaxValue</span>) <span onmouseout="hideTip(event, 'fst10032', 73)" onmouseover="showTip(event, 'fst10032', 73)" class="i">vote</span>
<span class="l">22: </span>    <span class="o">|&gt;</span> <span onmouseout="hideTip(event, 'fst10019', 74)" onmouseover="showTip(event, 'fst10019', 74)" class="i">fst</span>
<span class="l">23: </span>
<span class="l">24: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10041', 75)" onmouseover="showTip(event, 'fst10041', 75)" class="i">add</span> <span onmouseout="hideTip(event, 'fst10024', 76)" onmouseover="showTip(event, 'fst10024', 76)" class="i">candidate</span> <span onmouseout="hideTip(event, 'fst10042', 77)" onmouseover="showTip(event, 'fst10042', 77)" class="i">candidateTotals</span> <span class="o">=</span>
<span class="l">25: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10043', 78)" onmouseover="showTip(event, 'fst10043', 78)" class="i">incr</span> <span onmouseout="hideTip(event, 'fst10044', 79)" onmouseover="showTip(event, 'fst10044', 79)" class="i">ct</span> <span class="o">=</span> <span class="k">if</span> <span onmouseout="hideTip(event, 'fst10024', 80)" onmouseover="showTip(event, 'fst10024', 80)" class="i">candidate</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10019', 81)" onmouseover="showTip(event, 'fst10019', 81)" class="i">fst</span> <span onmouseout="hideTip(event, 'fst10044', 82)" onmouseover="showTip(event, 'fst10044', 82)" class="i">ct</span> <span class="k">then</span> <span onmouseout="hideTip(event, 'fst10024', 83)" onmouseover="showTip(event, 'fst10024', 83)" class="i">candidate</span>, <span onmouseout="hideTip(event, 'fst10036', 84)" onmouseover="showTip(event, 'fst10036', 84)" class="i">snd</span> <span onmouseout="hideTip(event, 'fst10044', 85)" onmouseover="showTip(event, 'fst10044', 85)" class="i">ct</span> <span class="o">+</span> <span class="n">1</span> <span class="k">else</span> <span onmouseout="hideTip(event, 'fst10044', 86)" onmouseover="showTip(event, 'fst10044', 86)" class="i">ct</span>
<span class="l">26: </span>    <span onmouseout="hideTip(event, 'fst10011', 87)" onmouseover="showTip(event, 'fst10011', 87)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10027', 88)" onmouseover="showTip(event, 'fst10027', 88)" class="i">map</span> <span onmouseout="hideTip(event, 'fst10043', 89)" onmouseover="showTip(event, 'fst10043', 89)" class="i">incr</span> <span onmouseout="hideTip(event, 'fst10042', 90)" onmouseover="showTip(event, 'fst10042', 90)" class="i">candidateTotals</span>
<span class="l">27: </span>
<span class="l">28: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10045', 91)" onmouseover="showTip(event, 'fst10045', 91)" class="i">isThereAWinner</span> <span onmouseout="hideTip(event, 'fst10046', 92)" onmouseover="showTip(event, 'fst10046', 92)" class="i">result</span> <span class="o">=</span>
<span class="l">29: </span>    <span onmouseout="hideTip(event, 'fst10011', 93)" onmouseover="showTip(event, 'fst10011', 93)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10025', 94)" onmouseover="showTip(event, 'fst10025', 94)" class="i">exists</span> (<span class="k">fun</span> (_, <span onmouseout="hideTip(event, 'fst10047', 95)" onmouseover="showTip(event, 'fst10047', 95)" class="i">percentage</span>) <span class="k">-&gt;</span> <span onmouseout="hideTip(event, 'fst10047', 96)" onmouseover="showTip(event, 'fst10047', 96)" class="i">percentage</span> <span class="o">&gt;</span><span class="o">=</span> <span class="n">50.</span>) <span onmouseout="hideTip(event, 'fst10046', 97)" onmouseover="showTip(event, 'fst10046', 97)" class="i">result</span>
<span class="l">30: </span>
<span class="l">31: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10048', 98)" onmouseover="showTip(event, 'fst10048', 98)" class="i">firstPreferenceResult</span> <span onmouseout="hideTip(event, 'fst10049', 99)" onmouseover="showTip(event, 'fst10049', 99)" class="i">candidates</span> <span onmouseout="hideTip(event, 'fst10050', 100)" onmouseover="showTip(event, 'fst10050', 100)" class="i">election</span> <span class="o">=</span>
<span class="l">32: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10051', 101)" onmouseover="showTip(event, 'fst10051', 101)" class="i">totalNumberOfVotes</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10052', 102)" onmouseover="showTip(event, 'fst10052', 102)" class="i">float</span> <span class="o">&lt;|</span> <span onmouseout="hideTip(event, 'fst10011', 103)" onmouseover="showTip(event, 'fst10011', 103)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10053', 104)" onmouseover="showTip(event, 'fst10053', 104)" class="i">length</span> <span onmouseout="hideTip(event, 'fst10050', 105)" onmouseover="showTip(event, 'fst10050', 105)" class="i">election</span>
<span class="l">33: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10054', 106)" onmouseover="showTip(event, 'fst10054', 106)" class="i">initialTotals</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10011', 107)" onmouseover="showTip(event, 'fst10011', 107)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10027', 108)" onmouseover="showTip(event, 'fst10027', 108)" class="i">map</span> (<span class="k">fun</span> <span onmouseout="hideTip(event, 'fst10055', 109)" onmouseover="showTip(event, 'fst10055', 109)" class="i">c</span> <span class="k">-&gt;</span> <span onmouseout="hideTip(event, 'fst10055', 110)" onmouseover="showTip(event, 'fst10055', 110)" class="i">c</span>,<span class="n">0</span>) <span onmouseout="hideTip(event, 'fst10049', 111)" onmouseover="showTip(event, 'fst10049', 111)" class="i">candidates</span>
<span class="l">34: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10056', 112)" onmouseover="showTip(event, 'fst10056', 112)" class="i">toPercentage</span> (<span onmouseout="hideTip(event, 'fst10057', 113)" onmouseover="showTip(event, 'fst10057', 113)" class="i">candidate</span>,<span onmouseout="hideTip(event, 'fst10058', 114)" onmouseover="showTip(event, 'fst10058', 114)" class="i">total</span>) <span class="o">=</span> 
<span class="l">35: </span>        <span onmouseout="hideTip(event, 'fst10057', 115)" onmouseover="showTip(event, 'fst10057', 115)" class="i">candidate</span>,(<span onmouseout="hideTip(event, 'fst10052', 116)" onmouseover="showTip(event, 'fst10052', 116)" class="i">float</span> <span onmouseout="hideTip(event, 'fst10058', 117)" onmouseover="showTip(event, 'fst10058', 117)" class="i">total</span>)<span class="o">/</span><span onmouseout="hideTip(event, 'fst10051', 118)" onmouseover="showTip(event, 'fst10051', 118)" class="i">totalNumberOfVotes</span><span class="o">*</span><span class="n">100.0</span>
<span class="l">36: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10059', 119)" onmouseover="showTip(event, 'fst10059', 119)" class="i">addVote</span> <span onmouseout="hideTip(event, 'fst10060', 120)" onmouseover="showTip(event, 'fst10060', 120)" class="i">candidateTotals</span> <span onmouseout="hideTip(event, 'fst10032', 121)" onmouseover="showTip(event, 'fst10032', 121)" class="i">vote</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10041', 122)" onmouseover="showTip(event, 'fst10041', 122)" class="i">add</span> (<span onmouseout="hideTip(event, 'fst10031', 123)" onmouseover="showTip(event, 'fst10031', 123)" class="i">firstPreference</span> <span onmouseout="hideTip(event, 'fst10032', 124)" onmouseover="showTip(event, 'fst10032', 124)" class="i">vote</span>) <span onmouseout="hideTip(event, 'fst10060', 125)" onmouseover="showTip(event, 'fst10060', 125)" class="i">candidateTotals</span>
<span class="l">37: </span>    <span onmouseout="hideTip(event, 'fst10011', 126)" onmouseover="showTip(event, 'fst10011', 126)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10037', 127)" onmouseover="showTip(event, 'fst10037', 127)" class="i">fold</span> <span onmouseout="hideTip(event, 'fst10059', 128)" onmouseover="showTip(event, 'fst10059', 128)" class="i">addVote</span> <span onmouseout="hideTip(event, 'fst10054', 129)" onmouseover="showTip(event, 'fst10054', 129)" class="i">initialTotals</span> <span onmouseout="hideTip(event, 'fst10050', 130)" onmouseover="showTip(event, 'fst10050', 130)" class="i">election</span>
<span class="l">38: </span>    <span class="o">|&gt;</span> <span onmouseout="hideTip(event, 'fst10011', 131)" onmouseover="showTip(event, 'fst10011', 131)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10027', 132)" onmouseover="showTip(event, 'fst10027', 132)" class="i">map</span> <span onmouseout="hideTip(event, 'fst10056', 133)" onmouseover="showTip(event, 'fst10056', 133)" class="i">toPercentage</span>
<span class="l">39: </span>
<span class="l">40: </span><span class="k">let</span> <span class="k">rec</span> <span onmouseout="hideTip(event, 'fst10061', 134)" onmouseover="showTip(event, 'fst10061', 134)" class="i">electionResult</span> <span onmouseout="hideTip(event, 'fst10049', 135)" onmouseover="showTip(event, 'fst10049', 135)" class="i">candidates</span> <span onmouseout="hideTip(event, 'fst10050', 136)" onmouseover="showTip(event, 'fst10050', 136)" class="i">election</span> <span class="o">=</span>
<span class="l">41: </span>    <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10062', 137)" onmouseover="showTip(event, 'fst10062', 137)" class="i">result</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst10048', 138)" onmouseover="showTip(event, 'fst10048', 138)" class="i">firstPreferenceResult</span> <span onmouseout="hideTip(event, 'fst10049', 139)" onmouseover="showTip(event, 'fst10049', 139)" class="i">candidates</span> <span onmouseout="hideTip(event, 'fst10050', 140)" onmouseover="showTip(event, 'fst10050', 140)" class="i">election</span>
<span class="l">42: </span>
<span class="l">43: </span>    <span class="k">if</span> <span onmouseout="hideTip(event, 'fst10045', 141)" onmouseover="showTip(event, 'fst10045', 141)" class="i">isThereAWinner</span> <span onmouseout="hideTip(event, 'fst10062', 142)" onmouseover="showTip(event, 'fst10062', 142)" class="i">result</span> <span class="k">then</span>
<span class="l">44: </span>        <span onmouseout="hideTip(event, 'fst10063', 143)" onmouseover="showTip(event, 'fst10063', 143)" class="i">printfn</span> <span class="s">&quot;</span><span class="s">final</span><span class="s"> </span><span class="s">%</span><span class="s">A</span><span class="s">&quot;</span> <span onmouseout="hideTip(event, 'fst10062', 144)" onmouseover="showTip(event, 'fst10062', 144)" class="i">result</span>
<span class="l">45: </span>    <span class="k">else</span>
<span class="l">46: </span>        <span class="k">let</span> <span onmouseout="hideTip(event, 'fst10064', 145)" onmouseover="showTip(event, 'fst10064', 145)" class="i">losers</span>, <span onmouseout="hideTip(event, 'fst10065', 146)" onmouseover="showTip(event, 'fst10065', 146)" class="i">winners</span> <span class="o">=</span> <span onmouseout="hideTip(event, 'fst1008', 147)" onmouseover="showTip(event, 'fst1008', 147)" class="i">partitionCandidates</span> <span onmouseout="hideTip(event, 'fst10062', 148)" onmouseover="showTip(event, 'fst10062', 148)" class="i">result</span>
<span class="l">47: </span>        <span onmouseout="hideTip(event, 'fst10063', 149)" onmouseover="showTip(event, 'fst10063', 149)" class="i">printfn</span> <span class="s">&quot;</span><span class="s">-</span><span class="s">-</span><span class="s"> </span><span class="s">%</span><span class="s">A</span><span class="s">\n</span><span class="s">    </span><span class="s">winners</span><span class="s"> </span><span class="s">%</span><span class="s">A</span><span class="s"> </span><span class="s">losers</span><span class="s"> </span><span class="s">%</span><span class="s">A</span><span class="s">&quot;</span> <span onmouseout="hideTip(event, 'fst10062', 150)" onmouseover="showTip(event, 'fst10062', 150)" class="i">result</span> <span onmouseout="hideTip(event, 'fst10065', 151)" onmouseover="showTip(event, 'fst10065', 151)" class="i">winners</span> <span onmouseout="hideTip(event, 'fst10064', 152)" onmouseover="showTip(event, 'fst10064', 152)" class="i">losers</span>
<span class="l">48: </span>        <span onmouseout="hideTip(event, 'fst10061', 153)" onmouseover="showTip(event, 'fst10061', 153)" class="i">electionResult</span> <span onmouseout="hideTip(event, 'fst10065', 154)" onmouseover="showTip(event, 'fst10065', 154)" class="i">winners</span> (<span onmouseout="hideTip(event, 'fst10020', 155)" onmouseover="showTip(event, 'fst10020', 155)" class="i">remove</span> <span onmouseout="hideTip(event, 'fst10064', 156)" onmouseover="showTip(event, 'fst10064', 156)" class="i">losers</span> <span onmouseout="hideTip(event, 'fst10050', 157)" onmouseover="showTip(event, 'fst10050', 157)" class="i">election</span>)
<span class="l">49: </span>
<span class="l">50: </span><span class="c">//</span><span class="c"> </span><span class="c">The</span><span class="c"> </span><span class="c">Election</span><span class="c"> </span><span class="c">Results</span>
<span class="l">51: </span>
<span class="l">52: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10066', 158)" onmouseover="showTip(event, 'fst10066', 158)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10067', 159)" onmouseover="showTip(event, 'fst10067', 159)" class="i">candidates</span> <span onmouseout="hideTip(event, 'fst10068', 160)" onmouseover="showTip(event, 'fst10068', 160)" class="i">preferences</span> <span class="o">=</span>
<span class="l">53: </span>    <span onmouseout="hideTip(event, 'fst10011', 161)" onmouseover="showTip(event, 'fst10011', 161)" class="i">List</span><span class="o">.</span><span onmouseout="hideTip(event, 'fst10069', 162)" onmouseover="showTip(event, 'fst10069', 162)" class="i">zip</span> <span onmouseout="hideTip(event, 'fst10067', 163)" onmouseover="showTip(event, 'fst10067', 163)" class="i">candidates</span> <span onmouseout="hideTip(event, 'fst10068', 164)" onmouseover="showTip(event, 'fst10068', 164)" class="i">preferences</span>
<span class="l">54: </span>
<span class="l">55: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10070', 165)" onmouseover="showTip(event, 'fst10070', 165)" class="i">candidates</span> <span class="o">=</span> [<span class="s">&quot;</span><span class="s">a</span><span class="s">&quot;</span>; <span class="s">&quot;</span><span class="s">b</span><span class="s">&quot;</span>; <span class="s">&quot;</span><span class="s">c</span><span class="s">&quot;</span>; <span class="s">&quot;</span><span class="s">d</span><span class="s">&quot;</span>]
<span class="l">56: </span><span class="k">let</span> <span onmouseout="hideTip(event, 'fst10071', 166)" onmouseover="showTip(event, 'fst10071', 166)" class="i">election</span> <span class="o">=</span> [
<span class="l">57: </span>    <span onmouseout="hideTip(event, 'fst10066', 167)" onmouseover="showTip(event, 'fst10066', 167)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 168)" onmouseover="showTip(event, 'fst10070', 168)" class="i">candidates</span> [<span class="n">1</span>;<span class="n">2</span>;<span class="n">3</span>;<span class="n">4</span>]
<span class="l">58: </span>    <span onmouseout="hideTip(event, 'fst10066', 169)" onmouseover="showTip(event, 'fst10066', 169)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 170)" onmouseover="showTip(event, 'fst10070', 170)" class="i">candidates</span> [<span class="n">1</span>;<span class="n">2</span>;<span class="n">3</span>;<span class="n">4</span>]
<span class="l">59: </span>    <span onmouseout="hideTip(event, 'fst10066', 171)" onmouseover="showTip(event, 'fst10066', 171)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 172)" onmouseover="showTip(event, 'fst10070', 172)" class="i">candidates</span> [<span class="n">1</span>;<span class="n">2</span>;<span class="n">3</span>;<span class="n">4</span>]
<span class="l">60: </span>    <span onmouseout="hideTip(event, 'fst10066', 173)" onmouseover="showTip(event, 'fst10066', 173)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 174)" onmouseover="showTip(event, 'fst10070', 174)" class="i">candidates</span> [<span class="n">1</span>;<span class="n">2</span>;<span class="n">3</span>;<span class="n">4</span>]
<span class="l">61: </span>    <span onmouseout="hideTip(event, 'fst10066', 175)" onmouseover="showTip(event, 'fst10066', 175)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 176)" onmouseover="showTip(event, 'fst10070', 176)" class="i">candidates</span> [<span class="n">4</span>;<span class="n">3</span>;<span class="n">2</span>;<span class="n">1</span>]
<span class="l">62: </span>    <span onmouseout="hideTip(event, 'fst10066', 177)" onmouseover="showTip(event, 'fst10066', 177)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 178)" onmouseover="showTip(event, 'fst10070', 178)" class="i">candidates</span> [<span class="n">4</span>;<span class="n">3</span>;<span class="n">2</span>;<span class="n">1</span>]
<span class="l">63: </span>    <span onmouseout="hideTip(event, 'fst10066', 179)" onmouseover="showTip(event, 'fst10066', 179)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 180)" onmouseover="showTip(event, 'fst10070', 180)" class="i">candidates</span> [<span class="n">3</span>;<span class="n">4</span>;<span class="n">1</span>;<span class="n">2</span>]
<span class="l">64: </span>    <span onmouseout="hideTip(event, 'fst10066', 181)" onmouseover="showTip(event, 'fst10066', 181)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 182)" onmouseover="showTip(event, 'fst10070', 182)" class="i">candidates</span> [<span class="n">3</span>;<span class="n">4</span>;<span class="n">1</span>;<span class="n">2</span>]
<span class="l">65: </span>    <span onmouseout="hideTip(event, 'fst10066', 183)" onmouseover="showTip(event, 'fst10066', 183)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 184)" onmouseover="showTip(event, 'fst10070', 184)" class="i">candidates</span> [<span class="n">4</span>;<span class="n">1</span>;<span class="n">3</span>;<span class="n">2</span>]
<span class="l">66: </span>    <span onmouseout="hideTip(event, 'fst10066', 185)" onmouseover="showTip(event, 'fst10066', 185)" class="i">castVote</span> <span onmouseout="hideTip(event, 'fst10070', 186)" onmouseover="showTip(event, 'fst10070', 186)" class="i">candidates</span> [<span class="n">3</span>;<span class="n">4</span>;<span class="n">2</span>;<span class="n">1</span>]
<span class="l">67: </span>]
<span class="l">68: </span>
<span class="l">69: </span><span onmouseout="hideTip(event, 'fst10061', 187)" onmouseover="showTip(event, 'fst10061', 187)" class="i">electionResult</span> <span onmouseout="hideTip(event, 'fst10070', 188)" onmouseover="showTip(event, 'fst10070', 188)" class="i">candidates</span> <span onmouseout="hideTip(event, 'fst10071', 189)" onmouseover="showTip(event, 'fst10071', 189)" class="i">election</span></pre>


<!-- HTML code for ToolTips -->
<div class="tip" id="fst1001">Multiple items
<br />val string : &#39;T -&gt; string<br /><br />Full name: Microsoft.FSharp.Core.Operators.string
<br /><br />--------------------<br />
<br />type string = System.String<br /><br />Full name: Microsoft.FSharp.Core.string<br /><br />&#160;&#160;type: string<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.ICloneable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;string&gt;<br />&#160;&#160;implements: seq&lt;char&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br />&#160;&#160;implements: System.IEquatable&lt;string&gt;<br /></div>
<div class="tip" id="fst1002">type Preference = int<br /><br />Full name: Snippet.Preference<br /><br />&#160;&#160;type: Preference<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;int&gt;<br />&#160;&#160;implements: System.IEquatable&lt;int&gt;<br />&#160;&#160;inherits: System.ValueType<br /></div>
<div class="tip" id="fst1003">Multiple items
<br />val int : &#39;T -&gt; int (requires member op_Explicit)<br /><br />Full name: Microsoft.FSharp.Core.Operators.int
<br /><br />--------------------<br />
<br />type int&lt;&#39;Measure&gt; = int<br /><br />Full name: Microsoft.FSharp.Core.int&lt;_&gt;<br /><br />&#160;&#160;type: int&lt;&#39;Measure&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IComparable&lt;int&lt;&#39;Measure&gt;&gt;<br />&#160;&#160;implements: System.IEquatable&lt;int&lt;&#39;Measure&gt;&gt;<br />&#160;&#160;inherits: System.ValueType<br />
<br /><br />--------------------<br />
<br />type int = int32<br /><br />Full name: Microsoft.FSharp.Core.int<br /><br />&#160;&#160;type: int<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;int&gt;<br />&#160;&#160;implements: System.IEquatable&lt;int&gt;<br />&#160;&#160;inherits: System.ValueType<br /></div>
<div class="tip" id="fst1004">type Vote = (Candidate * Preference) list<br /><br />Full name: Snippet.Vote<br /><br />&#160;&#160;type: Vote<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;Candidate * Preference&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;Candidate * Preference&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst1005">type Candidate = string<br /><br />Full name: Snippet.Candidate<br /><br />&#160;&#160;type: Candidate<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.ICloneable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;string&gt;<br />&#160;&#160;implements: seq&lt;char&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br />&#160;&#160;implements: System.IEquatable&lt;string&gt;<br /></div>
<div class="tip" id="fst1006">type &#39;T list = List&lt;&#39;T&gt;<br /><br />Full name: Microsoft.FSharp.Collections.list&lt;_&gt;<br /><br />&#160;&#160;type: &#39;T list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;T&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;T&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst1007">type Election = Vote list<br /><br />Full name: Snippet.Election<br /><br />&#160;&#160;type: Election<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;Vote&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;Vote&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst1008">val partitionCandidates : (&#39;a * &#39;b) list -&gt; &#39;a list * &#39;a list (requires comparison)<br /><br />Full name: Snippet.partitionCandidates<br /></div>
<div class="tip" id="fst1009">val result : (&#39;a * &#39;b) list (requires comparison)<br /><br />&#160;&#160;type: (&#39;a * &#39;b) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;a * &#39;b&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;a * &#39;b&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10010">val losingPercentage : &#39;b (requires comparison)<br /></div>
<div class="tip" id="fst10011">Multiple items
<br />module List<br /><br />from Microsoft.FSharp.Collections
<br /><br />--------------------<br />
<br />type List&lt;&#39;T&gt; =<br />&#160;&#160;| ( [] )<br />&#160;&#160;| ( :: ) of &#39;T * &#39;T list<br />&#160;&#160;with<br />&#160;&#160;&#160;&#160;interface System.Collections.IEnumerable<br />&#160;&#160;&#160;&#160;interface System.Collections.Generic.IEnumerable&lt;&#39;T&gt;<br />&#160;&#160;&#160;&#160;member Head : &#39;T<br />&#160;&#160;&#160;&#160;member IsEmpty : bool<br />&#160;&#160;&#160;&#160;member Item : index:int -&gt; &#39;T with get<br />&#160;&#160;&#160;&#160;member Length : int<br />&#160;&#160;&#160;&#160;member Tail : &#39;T list<br />&#160;&#160;&#160;&#160;static member Cons : head:&#39;T * tail:&#39;T list -&gt; &#39;T list<br />&#160;&#160;&#160;&#160;static member Empty : &#39;T list<br />&#160;&#160;end<br /><br />Full name: Microsoft.FSharp.Collections.List&lt;_&gt;<br /><br />&#160;&#160;type: List&lt;&#39;T&gt;<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;T&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;T&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10012">val minBy : (&#39;T -&gt; &#39;U) -&gt; &#39;T list -&gt; &#39;T (requires comparison)<br /><br />Full name: Microsoft.FSharp.Collections.List.minBy<br /></div>
<div class="tip" id="fst10013">val c : &#39;a<br /></div>
<div class="tip" id="fst10014">val p : &#39;b (requires comparison)<br /></div>
<div class="tip" id="fst10015">val partition : (&#39;T -&gt; bool) -&gt; &#39;T list -&gt; &#39;T list * &#39;T list<br /><br />Full name: Microsoft.FSharp.Collections.List.partition<br /></div>
<div class="tip" id="fst10016">val ls : (&#39;a * &#39;b) list (requires comparison)<br /><br />&#160;&#160;type: (&#39;a * &#39;b) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;a * &#39;b&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;a * &#39;b&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10017">val ws : (&#39;a * &#39;b) list (requires comparison)<br /><br />&#160;&#160;type: (&#39;a * &#39;b) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;a * &#39;b&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;a * &#39;b&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10018">val unzip : (&#39;T1 * &#39;T2) list -&gt; &#39;T1 list * &#39;T2 list<br /><br />Full name: Microsoft.FSharp.Collections.List.unzip<br /></div>
<div class="tip" id="fst10019">val fst : (&#39;T1 * &#39;T2) -&gt; &#39;T1<br /><br />Full name: Microsoft.FSharp.Core.Operators.fst<br /></div>
<div class="tip" id="fst10020">val remove : &#39;a list -&gt; (&#39;a * &#39;b) list list -&gt; (&#39;a * &#39;b) list list (requires equality)<br /><br />Full name: Snippet.remove<br /></div>
<div class="tip" id="fst10021">val losers : &#39;a list (requires equality)<br /><br />&#160;&#160;type: &#39;a list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;a&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;a&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10022">val election : (&#39;a * &#39;b) list list (requires equality)<br /><br />&#160;&#160;type: (&#39;a * &#39;b) list list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;(&#39;a * &#39;b) list&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;(&#39;a * &#39;b) list&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10023">val isLosing : (&#39;a -&gt; bool) (requires equality)<br /></div>
<div class="tip" id="fst10024">val candidate : &#39;a (requires equality)<br /></div>
<div class="tip" id="fst10025">val exists : (&#39;T -&gt; bool) -&gt; &#39;T list -&gt; bool<br /><br />Full name: Microsoft.FSharp.Collections.List.exists<br /></div>
<div class="tip" id="fst10026">val loser : &#39;a (requires equality)<br /></div>
<div class="tip" id="fst10027">val map : (&#39;T -&gt; &#39;U) -&gt; &#39;T list -&gt; &#39;U list<br /><br />Full name: Microsoft.FSharp.Collections.List.map<br /></div>
<div class="tip" id="fst10028">val filter : (&#39;T -&gt; bool) -&gt; &#39;T list -&gt; &#39;T list<br /><br />Full name: Microsoft.FSharp.Collections.List.filter<br /></div>
<div class="tip" id="fst10029">val c : &#39;a (requires equality)<br /></div>
<div class="tip" id="fst10030">val not : bool -&gt; bool<br /><br />Full name: Microsoft.FSharp.Core.Operators.not<br /></div>
<div class="tip" id="fst10031">val firstPreference : (string * int) list -&gt; string<br /><br />Full name: Snippet.firstPreference<br /></div>
<div class="tip" id="fst10032">val vote : (string * int) list<br /><br />&#160;&#160;type: (string * int) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string * int&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string * int&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10033">val min : (&#39;a * &#39;b -&gt; &#39;a * &#39;b -&gt; &#39;a * &#39;b) (requires comparison)<br /></div>
<div class="tip" id="fst10034">val cp1 : &#39;a * &#39;b (requires comparison)<br /></div>
<div class="tip" id="fst10035">val cp2 : &#39;a * &#39;b (requires comparison)<br /></div>
<div class="tip" id="fst10036">val snd : (&#39;T1 * &#39;T2) -&gt; &#39;T2<br /><br />Full name: Microsoft.FSharp.Core.Operators.snd<br /></div>
<div class="tip" id="fst10037">val fold : (&#39;State -&gt; &#39;T -&gt; &#39;State) -&gt; &#39;State -&gt; &#39;T list -&gt; &#39;State<br /><br />Full name: Microsoft.FSharp.Collections.List.fold<br /></div>
<div class="tip" id="fst10038">namespace System<br /></div>
<div class="tip" id="fst10039">type Int32 =<br />&#160;&#160;struct<br />&#160;&#160;&#160;&#160;member CompareTo : obj -&gt; int<br />&#160;&#160;&#160;&#160;member CompareTo : int -&gt; int<br />&#160;&#160;&#160;&#160;member Equals : obj -&gt; bool<br />&#160;&#160;&#160;&#160;member Equals : int -&gt; bool<br />&#160;&#160;&#160;&#160;member GetHashCode : unit -&gt; int<br />&#160;&#160;&#160;&#160;member GetTypeCode : unit -&gt; System.TypeCode<br />&#160;&#160;&#160;&#160;member ToString : unit -&gt; string<br />&#160;&#160;&#160;&#160;member ToString : string -&gt; string<br />&#160;&#160;&#160;&#160;member ToString : System.IFormatProvider -&gt; string<br />&#160;&#160;&#160;&#160;member ToString : string * System.IFormatProvider -&gt; string<br />&#160;&#160;&#160;&#160;static val MaxValue : int<br />&#160;&#160;&#160;&#160;static val MinValue : int<br />&#160;&#160;&#160;&#160;static member Parse : string -&gt; int<br />&#160;&#160;&#160;&#160;static member Parse : string * System.Globalization.NumberStyles -&gt; int<br />&#160;&#160;&#160;&#160;static member Parse : string * System.IFormatProvider -&gt; int<br />&#160;&#160;&#160;&#160;static member Parse : string * System.Globalization.NumberStyles * System.IFormatProvider -&gt; int<br />&#160;&#160;&#160;&#160;static member TryParse : string * int -&gt; bool<br />&#160;&#160;&#160;&#160;static member TryParse : string * System.Globalization.NumberStyles * System.IFormatProvider * int -&gt; bool<br />&#160;&#160;end<br /><br />Full name: System.Int32<br /><br />&#160;&#160;type: System.Int32<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;int&gt;<br />&#160;&#160;implements: System.IEquatable&lt;int&gt;<br />&#160;&#160;inherits: System.ValueType<br /></div>
<div class="tip" id="fst10040">field System.Int32.MaxValue = 2147483647<br /></div>
<div class="tip" id="fst10041">val add : &#39;a -&gt; (&#39;a * int) list -&gt; (&#39;a * int) list (requires equality)<br /><br />Full name: Snippet.add<br /></div>
<div class="tip" id="fst10042">val candidateTotals : (&#39;a * int) list (requires equality)<br /><br />&#160;&#160;type: (&#39;a * int) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;a * int&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;a * int&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10043">val incr : (&#39;a * int -&gt; &#39;a * int) (requires equality)<br /></div>
<div class="tip" id="fst10044">val ct : &#39;a * int (requires equality)<br /></div>
<div class="tip" id="fst10045">val isThereAWinner : (&#39;a * float) list -&gt; bool<br /><br />Full name: Snippet.isThereAWinner<br /></div>
<div class="tip" id="fst10046">val result : (&#39;a * float) list<br /><br />&#160;&#160;type: (&#39;a * float) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;a * float&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;a * float&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10047">val percentage : float<br /><br />&#160;&#160;type: float<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;float&gt;<br />&#160;&#160;implements: System.IEquatable&lt;float&gt;<br />&#160;&#160;inherits: System.ValueType<br /></div>
<div class="tip" id="fst10048">val firstPreferenceResult : string list -&gt; (string * int) list list -&gt; (string * float) list<br /><br />Full name: Snippet.firstPreferenceResult<br /></div>
<div class="tip" id="fst10049">val candidates : string list<br /><br />&#160;&#160;type: string list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10050">val election : (string * int) list list<br /><br />&#160;&#160;type: (string * int) list list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;(string * int) list&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;(string * int) list&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10051">val totalNumberOfVotes : float<br /><br />&#160;&#160;type: float<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;float&gt;<br />&#160;&#160;implements: System.IEquatable&lt;float&gt;<br />&#160;&#160;inherits: System.ValueType<br /></div>
<div class="tip" id="fst10052">Multiple items
<br />val float : &#39;T -&gt; float (requires member op_Explicit)<br /><br />Full name: Microsoft.FSharp.Core.Operators.float
<br /><br />--------------------<br />
<br />type float&lt;&#39;Measure&gt; = float<br /><br />Full name: Microsoft.FSharp.Core.float&lt;_&gt;<br /><br />&#160;&#160;type: float&lt;&#39;Measure&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IComparable&lt;float&lt;&#39;Measure&gt;&gt;<br />&#160;&#160;implements: System.IEquatable&lt;float&lt;&#39;Measure&gt;&gt;<br />&#160;&#160;inherits: System.ValueType<br />
<br /><br />--------------------<br />
<br />type float = System.Double<br /><br />Full name: Microsoft.FSharp.Core.float<br /><br />&#160;&#160;type: float<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;float&gt;<br />&#160;&#160;implements: System.IEquatable&lt;float&gt;<br />&#160;&#160;inherits: System.ValueType<br /></div>
<div class="tip" id="fst10053">val length : &#39;T list -&gt; int<br /><br />Full name: Microsoft.FSharp.Collections.List.length<br /></div>
<div class="tip" id="fst10054">val initialTotals : (string * int) list<br /><br />&#160;&#160;type: (string * int) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string * int&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string * int&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10055">val c : string<br /><br />&#160;&#160;type: string<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.ICloneable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;string&gt;<br />&#160;&#160;implements: seq&lt;char&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br />&#160;&#160;implements: System.IEquatable&lt;string&gt;<br /></div>
<div class="tip" id="fst10056">val toPercentage : (&#39;a * int -&gt; &#39;a * float)<br /></div>
<div class="tip" id="fst10057">val candidate : &#39;a<br /></div>
<div class="tip" id="fst10058">val total : int<br /><br />&#160;&#160;type: int<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.IFormattable<br />&#160;&#160;implements: System.IConvertible<br />&#160;&#160;implements: System.IComparable&lt;int&gt;<br />&#160;&#160;implements: System.IEquatable&lt;int&gt;<br />&#160;&#160;inherits: System.ValueType<br /></div>
<div class="tip" id="fst10059">val addVote : ((string * int) list -&gt; (string * int) list -&gt; (string * int) list)<br /></div>
<div class="tip" id="fst10060">val candidateTotals : (string * int) list<br /><br />&#160;&#160;type: (string * int) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string * int&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string * int&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10061">val electionResult : string list -&gt; (string * int) list list -&gt; unit<br /><br />Full name: Snippet.electionResult<br /></div>
<div class="tip" id="fst10062">val result : (string * float) list<br /><br />&#160;&#160;type: (string * float) list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string * float&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string * float&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10063">val printfn : Printf.TextWriterFormat&lt;&#39;T&gt; -&gt; &#39;T<br /><br />Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn<br /></div>
<div class="tip" id="fst10064">val losers : string list<br /><br />&#160;&#160;type: string list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10065">val winners : string list<br /><br />&#160;&#160;type: string list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10066">val castVote : &#39;a list -&gt; &#39;b list -&gt; (&#39;a * &#39;b) list<br /><br />Full name: Snippet.castVote<br /></div>
<div class="tip" id="fst10067">val candidates : &#39;a list<br /><br />&#160;&#160;type: &#39;a list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;a&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;a&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10068">val preferences : &#39;b list<br /><br />&#160;&#160;type: &#39;b list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;&#39;b&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;&#39;b&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10069">val zip : &#39;T1 list -&gt; &#39;T2 list -&gt; (&#39;T1 * &#39;T2) list<br /><br />Full name: Microsoft.FSharp.Collections.List.zip<br /></div>
<div class="tip" id="fst10070">val candidates : string list<br /><br />Full name: Snippet.candidates<br /><br />&#160;&#160;type: string list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;string&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;string&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>
<div class="tip" id="fst10071">val election : (string * int) list list<br /><br />Full name: Snippet.election<br /><br />&#160;&#160;type: (string * int) list list<br />&#160;&#160;implements: System.Collections.IStructuralEquatable<br />&#160;&#160;implements: System.IComparable&lt;List&lt;(string * int) list&gt;&gt;<br />&#160;&#160;implements: System.IComparable<br />&#160;&#160;implements: System.Collections.IStructuralComparable<br />&#160;&#160;implements: System.Collections.Generic.IEnumerable&lt;(string * int) list&gt;<br />&#160;&#160;implements: System.Collections.IEnumerable<br /></div>

<p>Thanks to Tomas P for the awesome F# web snippet generator over at <a href="http://fssnip.net/">fssnip.net</a></p>]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-11378768.xml</wfw:commentRss></item><item><title>Real-time(ish) Market Analysis in F#</title><category>concurrent</category><category>f#</category><category>functional programming</category><category>parallel</category><category>talks</category><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Fri, 06 May 2011 06:25:17 +0000</pubDate><link>http://www.simontylercousins.net/journal/2011/5/6/real-timeish-market-analysis-in-f.html</link><guid isPermaLink="false">740536:8686775:11378303</guid><description><![CDATA[<p>The <a href="http://www.simontylercousins.net/downloads/power-market-analysis.pdf">slides PDF</a> for my presentation on <a href="http://www.meetup.com/FSharpLondon/events/17455485/"><em>Real-time(ish) Market Analysis in F#</em></a> can be found on my <a href="http://www.simontylercousins.net/downloads/">downloads</a> page.</p>
<p>Thank you to Philip Trelford for the invite and the organisers at Skills Matter and to everyone that attended. It was a pleasure talking with you all.</p>]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-11378303.xml</wfw:commentRss></item><item><title>TDD Challenged</title><category>f#</category><category>programming</category><category>tdd</category><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Sun, 20 Mar 2011 09:00:00 +0000</pubDate><link>http://www.simontylercousins.net/journal/2011/3/20/tdd-challenged.html</link><guid isPermaLink="false">740536:8686775:10850698</guid><description><![CDATA[Am I TDD challenged or is TDD challenged by REPLs?]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-10850698.xml</wfw:commentRss></item><item><title>Functional Programming Exchange 2011</title><category>c#</category><category>f#</category><category>talk</category><category>talks</category><dc:creator>Simon Tyler Cousins</dc:creator><pubDate>Fri, 18 Mar 2011 16:48:40 +0000</pubDate><link>http://www.simontylercousins.net/journal/2011/3/18/functional-programming-exchange-2011.html</link><guid isPermaLink="false">740536:8686775:10837289</guid><description><![CDATA[Slides for Functional Programming Exchange 2011, London, 18/03/2011]]></description><wfw:commentRss>http://www.simontylercousins.net/journal/rss-comments-entry-10837289.xml</wfw:commentRss></item></channel></rss>
