Browse by Tags

All Tags » Functional Programming (RSS)

Visual Studio 2010 and .NET Framework Beta 2 available on Wednesday

This blog has been abandoned for the longest time :-$ but I’ve got great news to try and re-inaugurate it (again): it’s just been announced that beta 2 for Visual Studio 2010 and .NET Framework 4 will be available the day after tomorrow, i.e. on October...

Distance between adjacent points in F#

Let’s say you are given a list of data points: [7;5;12;8;5] And you are asked to find the distance between every adjacent pair, that is: [(7-5);(5-12);(12-8);(8-5)] = [2;-7;4;3] It turns out that there is an elegant solution to this problem: let rec pairs...

Free F# libraries (well, almost)

In what was one of the very last PDC2008 sessions, Luca Bolognese did an encore presentation of F#, instead of trying to tell you what it was all about I invite you to watch the video (Luca is engaging and funny, and the session is so packed with information...

Point distance, imperative vs. functional style

Let’s consider a silly simple algebra problem: given a specific point and a set of several other points, find the closest point in the set to the given point. One C# solution is:     1      static class PointMath    ...

The first Visual F# CTP is here!

You leave on vacation for one short week and a lot happens... for example, Don Syme & co. have released the first F# CTP , well on the way (hopefully before this year's end) to put F# on the same level as C#, C++ or VB.NET. As far as I know, this...

F# 1.9.4.19 runs out of the box with Mono in Linux

Don Syme just announced a minor update to the F# environment , minor may be but of great interest to a certain community: it so happens that at some point F# stopped working properly in Linux, a workaround was published (and it actually works, but you...

A cool way to find out whether a number is palindromic

In this blog entry I proposed a solution to Problem 4 at Project Euler , a crucial element of the problem is to find out whether a number is a palindrome (909 is, 809 isn't), a bit out of laziness and a bit in order to reuse existing methods, I decided...

New version of F# just released

In its way from research language to commercial language, Don Syme just announced that, silently, on May the 1st version 1.9.4.15 of F# was released .   This new version incorporates a number of specific enhancements (F# is now basically in stabilization...

Which is the ten thousand first prime?

Prime numbers have a good deal of practical applications (for example in cryptography) but let's face it, even if they would have none, they would still be the favorite toy of mathematicians . In Problem 7 of Project Euler , we are asked to find the 10001st...

The square of the sum vs. the sum of the squares

The sixth Project Euler problem poses an exercise that, to me, offers no major hurdles: What is the difference between the sum of the squares and the square of the sums [of a sequence of natural numbers]? The functional C# solution is fairly easy to write...
More Posts Next page »