<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Project Euler in F# &#8211; Problem 22</title>
	<atom:link href="http://www.claudiocherubino.it/2008/02/12/project-euler-in-f-problem-22/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.claudiocherubino.it/2008/02/12/project-euler-in-f-problem-22/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=project-euler-in-f-problem-22</link>
	<description>Life of a Googler</description>
	<lastBuildDate>Wed, 25 Jan 2012 13:36:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Bob Roberts</title>
		<link>http://www.claudiocherubino.it/2008/02/12/project-euler-in-f-problem-22/comment-page-1/#comment-20420</link>
		<dc:creator>Bob Roberts</dc:creator>
		<pubDate>Thu, 13 Nov 2008 15:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.claudiocherubino.it/2008/02/12/project-euler-in-f-problem-22/#comment-20420</guid>
		<description>You don&#039;t need to remove the quotes to sort the list.  The list will sort correctly with the quote.  When you add the value of the names, you can just ignore quotes when adding values.</description>
		<content:encoded><![CDATA[<p>You don&#8217;t need to remove the quotes to sort the list.  The list will sort correctly with the quote.  When you add the value of the names, you can just ignore quotes when adding values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michiel Borkent</title>
		<link>http://www.claudiocherubino.it/2008/02/12/project-euler-in-f-problem-22/comment-page-1/#comment-20419</link>
		<dc:creator>Michiel Borkent</dc:creator>
		<pubDate>Mon, 03 Mar 2008 02:40:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.claudiocherubino.it/2008/02/12/project-euler-in-f-problem-22/#comment-20419</guid>
		<description>Here is another solution using List.mapi:

#light
open System.IO
let answer2 =
    let names = File.ReadAllText(@&quot;C:\dev\Chapter4\names.txt&quot;).Split([&#124;&#039;,&#039;&#124;]) &#124;&gt; Seq.map (fun x -&gt; x.Replace(&quot;\&quot;&quot;, &quot;&quot;))
    let sortednames = names &#124;&gt; Seq.to_list &#124;&gt; List.sort compare
    let CharVal x = 1 + Char.code x - Char.code &#039;A&#039;
    let Score i x =
        (i+1) * (Seq.map CharVal x &#124;&gt; Seq.fold1 (+))
    List.mapi Score sortednames &#124;&gt; Seq.fold1 (+)</description>
		<content:encoded><![CDATA[<p>Here is another solution using List.mapi:</p>
<p>#light<br />
open System.IO<br />
let answer2 =<br />
    let names = File.ReadAllText(@&#8221;C:\dev\Chapter4\names.txt&#8221;).Split([|','|]) |&gt; Seq.map (fun x -&gt; x.Replace(&#8220;\&#8221;", &#8220;&#8221;))<br />
    let sortednames = names |&gt; Seq.to_list |&gt; List.sort compare<br />
    let CharVal x = 1 + Char.code x &#8211; Char.code &#8216;A&#8217;<br />
    let Score i x =<br />
        (i+1) * (Seq.map CharVal x |&gt; Seq.fold1 (+))<br />
    List.mapi Score sortednames |&gt; Seq.fold1 (+)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

