Snippets created by Carsten König

finds the points lying on the convex hull of the given set of points and
returns those points in clockwise direction, starting at the point
with minimum y-value
Remarks:
it's a more or less direct implementation of the algorithm named after Ronald Graham that is explained on http://en.wikipedia.org/wiki/Graham_scan
you can switch the definition Point for a proper type of your liking - e.g. System.Drawing.Point

you can easily find how to use continuations to iterate over a binary tree but what if the count of children for each node is not known at design time?
It's not so obvious how to do this in order to get a tail-recursive method.
This short snippet shows how to do this to sum the values of every leaf.
The second part demonstrates a general approach for other operations than addition.

calculating the distance between two locations on earth using haversine formula
see http://en.wikipedia.org/wiki/Haversine_formula
and implementing it using the posibilities of F#'s unit of measure system to avoid unit-conversion-errors concerning radians
convertet the code found here: http://www.movable-type.co.uk/scripts/latlong.html for an concrete implementation

shows a simple implementation of a vector and matrix type together with a QR-decomposition using the Gram-Schmidt method.
The algorithms themselfes are rather easy but I think the implementation of the types and the computations using recursive techniques might be interessting

for all those wanting to see the (rather unknown) statical interference of type-parameters (in contrast to generic type parameters) in action.
I demonstrated this by having som e fun with basic algebra and polynoms

Found an very good article on RS-Trees in Haskell (see: http://www.eecs.usma.edu/webs/people/okasaki/jfp99.ps)
It heavyly uses pattern recognition to translate those pesky balance-rules into short code.
Bellowe is the simple rewrite of the haskell-implementation in F# - enjoy