using Microsoft.FSharp.Collections;
private static void Print(string label, FSharpList<FSharpList<string>> lists)
Console.WriteLine(label);
foreach (var list in lists)
Console.WriteLine($"[{string.Join(',', list.Select(str => $"{str}"))}]");
public static void Main()
new [] { "b", "a", "c" },
new [] { "b", "a", "a", "b" },
new [] { "b", "a", "d" },
new [] { "a", "a", "a" },
new [] { "a", "b", "a" },
new [] { "b", "a", "b" },
new [] { "b", "a", "a" },
new [] { "b", "a", "d", "a" },
new [] { "b", "a", "a", "a" },
FSharpList<FSharpList<string>> lists = ListModule.OfSeq(arrays.Select(ListModule.OfSeq));
Print("Unsorted", lists);
Print("Sorted", ListModule.Sort(lists));