using System.Collections;
using System.Collections.Generic;
using Microsoft.FSharp.Collections;
private static int Compare(List<string> lhs, List<string> rhs)
if (lhs.Count < rhs.Count)
else if(lhs.Count > rhs.Count)
return StructuralComparisons.StructuralComparer.Compare(lhs.ToArray(), rhs.ToArray());
public static void Main()
var list1 = new List<string>(){"Bar", "Foo"};
var list2 = new List<string>(){"Bar", "Foo", "Zack"};
var list3 = new List<string>(){"Car", "Foo"};
Console.WriteLine($"{Compare(list1, list2)}");
Console.WriteLine($"{Compare(list2, list3)}");
Console.WriteLine($"{Compare(list1, list3)}");
Console.WriteLine($"{Compare(list1, list1)}");
var key1 = new[]{"Bar", "Foo"};
var key2 = new[]{"Bar", "Foo", "Zack"};
var key3 = new[]{"Car", "Foo"};
new FSharpMap<string[], int>(new List<Tuple<string[], int>>())
Console.WriteLine($"{fSharpMap[key1]}");
Console.WriteLine($"{fSharpMap[key2]}");
Console.WriteLine($"{fSharpMap[key3]}");
var key4 = new[]{"Bar", "Foo"};
var key5 = new[]{"Bar", "Foo", "Zack"};
var key6 = new[]{"Car", "Foo"};
Console.WriteLine($"{fSharpMap[key4]}");
Console.WriteLine($"{fSharpMap[key5]}");
Console.WriteLine($"{fSharpMap[key6]}");