using System;
using System.Linq;
using Microsoft.FSharp.Collections;
public class Program
{
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}"))}]");
}
Console.WriteLine();
public static void Main()
var arrays =
new[]
new [] { "b", "a", "c" },
new [] { "a", "a" },
new [] { "a", "b" },
new [] { "b", "a", "a", "b" },
new [] { "a" },
new [] { "b", "a", "d" },
new [] { "a", "a", "a" },
new string[] {},
new [] { "a", "b", "a" },
new [] { "b", "a", "b" },
new [] { "b", "a", "a" },
new [] { "b", "a", "d", "a" },
new [] { "b", "a", "a", "a" },
new [] { "b" },
new [] { "b", "a" },
};
FSharpList<FSharpList<string>> lists = ListModule.OfSeq(arrays.Select(ListModule.OfSeq));
Print("Unsorted", lists);
Print("Sorted", ListModule.Sort(lists));