4
votes
0answers
60 views

Fibonacci number function: convert to tail-recursion?

I've been implementing a function for calculating the nth Fibonacci number in F#. So far the best implementation I could come up with is this: ...
4
votes
2answers
119 views

F# rectangle packing algorithm

I would appreciate it if someone experienced in F# and/or functional programming to look over my code. This is practically the first thing I wrote in the language so I'm sure it's filled with ...
1
vote
0answers
139 views

Review my F# Red Black Tree Implementation [closed]

I have written this implementation for red black tree. I also have some helper methods to verify whether the generated tree is really balanced or not. Looks good to me.... but I find that most of the ...
1
vote
2answers
266 views

RGB Color Name Matching using Euclidean Distance (Improved)

The code below stems from work on a Euclidean Distance algorithm. The color table was simply a vehicle to test the algorithm. It is perhaps reinventing the wheel, however it is useful in itself. ...
2
votes
1answer
166 views

VB.Net interfacing with F# Euclidean Distance Algorithm

I testing F# code which calculates "nearness" of two N-dimensional points using a least square euclidean distance algorithm. The class library is written in F# and the calling will be from VB.NET. ...
2
votes
3answers
143 views

Is there a better way of defining custom calendars?

I need to define custom calendars and, in particular, test a DateTime for being a holiday. My current code is shown below. Is there a more concise/better way of ...
4
votes
1answer
606 views

Path sum - Dijkstra's algorithm in F#

I'm learning F# and I've decided to solve Project Euler's Problem #81 with Dijkstra's algorithm. In the 5 by 5 matrix below, the minimal path sum from the top left to the bottom right, by only ...
6
votes
1answer
319 views

F# Djikstras shortest path implementation

I'm just getting my feet wet with F#, by implementing some simple algorithms. First up: Djikstras shortest path. There is one piece I've written in this code which confuses me as to why it works: the ...