Yeah I'm in the same boat. I've been spending a bit of time looking into some of the big and popular Typescript projects. But something's not sinking in and I could use a intermediate/advanced guide.
using System;
using System.Text;
namespace Goal
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(G("al"));
Console.WriteLine(G()("al"));
Console.WriteLine(G()()()()()("al"));
}
static StringBuilder accumulator = new StringBuilder();
delegate dynamic GoalDelegate(string s = "o");
static dynamic G(string s = "o")
{
switch (s)
{
case "o":
accumulator.Append("o");
return (GoalDelegate)G;
case "al":
string result = "G" + accumulator.ToString() + "al";
accumulator.Clear();
return result;
default:
return null;
}
}
}
}