Skip to content

Instantly share code, notes, and snippets.

@rojepp
rojepp / gist:1122319
Created August 3, 2011 10:08
Test snippet
(* Test embedding in blogger... *)
let add x y = x + y
let add1 = add 1
let result = add1 2
printfn "%d" result
@rojepp
rojepp / Delegates.cs
Created October 26, 2010 11:49
Show how delegate definition matters, the following sample will rightfully not compile
class Program
{
delegate bool delA(string item);
delegate bool delB(string item);
static void Main(string[] args)
{
delA del = s => true;
callA(del);
callB(del);
@rojepp
rojepp / FindTF
Created October 19, 2010 19:32
Love the elegance of F#. This code looks for the TFS Command line tool and returns Some(path) or None
let findtfpath =
let VS_REGPATHS = [
@"Software\Wow6432Node\Microsoft\VisualStudio\10.0";
@"Software\Microsoft\VisualStudio\10.0";
@"Software\Wow6432Node\Microsoft\VisualStudio\9.0";
@"Software\Microsoft\VisualStudio\9.0";
@"Software\Wow6432Node\Microsoft\VisualStudio\8.0";
@"Software\Microsoft\VisualStudio\8.0"
]
let INSTALLDIR = "InstallDir";