Learning F#

Project Euler – Problem 4 Solution

Problem A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99. Find the largest palindrome made from the product of two 3-digit numbers. Solution In my solution above, I first built a function to check whether a given number is …

Project Euler – Problem 4 Solution Read More »

Project Euler – Problem 3 Solution

Problem The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? Solution As this solution requires a bit more work, I created two helper functions findFactorsOf and isPrime, and as you’ve probably noticed, I had explicitly declare that the value n should be …

Project Euler – Problem 3 Solution Read More »

Project Euler – Problem 2 Solution

Problem Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, … Find the sum of all the even-valued terms in the sequence which do not exceed four …

Project Euler – Problem 2 Solution Read More »

Project Euler – Problem 1 Solution

Introduction Having spent a bit of time learning the basics of F# I decided to try my hands on actually writing some code and get a better feel of the language and get more used to writing function code in general. And for that purpose, Project Euler provides a great source for small, isolated problems …

Project Euler – Problem 1 Solution Read More »

Learning F# – Part 3

Disclaimer: I do not claim credit for the code examples and much of the contents here, these are mostly extracts from the book by Chris Smith, Programming F#: A comprehensive guide for writing simple code to solve complex problems. In fact, if you’re thinking of learning F# and like what you read here, you should …

Learning F# – Part 3 Read More »

Learning F# – Part 2

Disclaimer: I do not claim credit for the code examples and much of the contents here, these are mostly extracts from the book by Chris Smith, Programming F#: A comprehensive guide for writing simple code to solve complex problems. In fact, if you’re thinking of learning F# and like what you read here, you should buy …

Learning F# – Part 2 Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close