C# type inference and extension methods: an abuse
Here’s a little example of statically-sized stacks in C#. They’re implemented with a linked-list as the backing store: using System; namespace ConsoleApplication { public static class MainClass { // Example: public static void Main(string[] args) { var stack = Stack.New<int>(); // real type Stack<Z,int> var s1 = stack.Push(1).Push(2).Push(3); // real type Stack<S<S<S<Z>>>> [...]