<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><item><title>Comment on Upgrading Orchard and XML-RPC Error posting with Live Writer by PAMP gold</title><link>/upgrading-orchard-and-xml-rpc-error-posting-with-live-writer#comment-86</link><description>Thanks for the post. It was very interesting and meaningful.</description><pubDate>2012-01-26T11:26:49</pubDate><guid isPermaLink="false">urn:comment:86</guid></item><item><title>Comment on Project Euler problems with F# by Rachel Reese</title><link>/project-euler-problems-with-f#comment-81</link><description>Nice JJoos -- the match keyword is something I haven't quite gotten a handle on yet. :) I'll have to make a point of using it in one of the next couple solutions. And maybe they reopened them? I was able to post a couple days ago.</description><pubDate>2011-10-13T03:04:17</pubDate><guid isPermaLink="false">urn:comment:81</guid></item><item><title>Comment on Project Euler problems with F# by JJoos</title><link>/project-euler-problems-with-f#comment-80</link><description>This is my solution for problem two:
let solutionA = 
    let rec sumEvenFib a b = 
        match b with
        | b when b &lt; 4000000 -&gt; b + sumEvenFib b ( b * 4 + a)
        | _ -&gt; 0

    lazy 
    (
        sumEvenFib 0 2
    )

I did the first 20 problems in f#, but the fora are closed for some time....</description><pubDate>2011-10-12T20:59:40</pubDate><guid isPermaLink="false">urn:comment:80</guid></item><item><title>Comment on Project Euler problems with F# by Rachel Reese</title><link>/project-euler-problems-with-f#comment-79</link><description>Thanks Chris, that helps a ton.

And thanks Daniel -- a fantastic explanation, and I will totally check out that paper!</description><pubDate>2011-10-12T05:00:41</pubDate><guid isPermaLink="false">urn:comment:79</guid></item><item><title>Comment on Project Euler problems with F# by Daniel Jackson</title><link>/project-euler-problems-with-f#comment-77</link><description>Much like imperative languages provide a for loop, or a while loop.  These loops are isomorphic to general patterns of GOTO. List.fold is a generalization of a pattern of recursion.  In functional programming classes of recursive operations have been investigated and chosen for their generality.  

To simplify your understanding, forget about the higher order function you pass to fold as well as the value you use to initialize the accumulator.   Then you see fold is simply something like this:  'a Seq -&gt; 'b.   You give it a list and you get back something else... that something else could even be an 'a Seq.  The dual of this operation would be unfold, where, again ignoring the cruft you have something that is essentially 'b -&gt; 'a Seq.   In F# there is also foldBack, and you will find that if you initialize it with an empty list and the id function you will get the original list.  foldBack (id) [] [1..5], then, is the identity on lists. The dual fold (id) [] [1..5] is the same as reversing the list (the opposite of your list I guess).   For more in depth information I suggest the paper by Erik Meijer entitled "Functional Programming with Bannanas, Lenses, Envelopes and Barbed Wire"</description><pubDate>2011-10-12T01:03:27</pubDate><guid isPermaLink="false">urn:comment:77</guid></item><item><title>Comment on Project Euler problems with F# by Chris Ammerman</title><link>/project-euler-problems-with-f#comment-76</link><description>You can think of List.fold as being very similar to IEnumerable&lt;T&gt;.Aggregate. You would us it any time you want to digest a collection to produce a single value. You could use it to take a list of strings and make it a single-string comma-separated list of the individual values, for instance. Or you could use it to calculate the total length of all of the strings added up, using just one method call instead of using loops, or chaining Select and Sum.</description><pubDate>2011-10-12T00:46:08</pubDate><guid isPermaLink="false">urn:comment:76</guid></item></channel></rss>
