Skip to content

Instantly share code, notes, and snippets.

View eriawan's full-sized avatar
:octocat:
Focusing on .NET, C#, F# and Azure DevOps

Eriawan Kusumawardhono eriawan

:octocat:
Focusing on .NET, C#, F# and Azure DevOps
View GitHub Profile
@eriawan
eriawan / Program.cs
Last active May 22, 2023 19:46
A helper class to enable trampoline to handle large recursive by adapting Y Combinator
internal class Program
{
static void Main(string[] args)
{
var fac10 = Factorial(10);
Console.WriteLine("Factorial 10 = " + fac10);
var fac20 = Factorial(20);
Console.WriteLine("Factorial 20 " + fac20);
var facAddition8000 = Factorial(8000);
// code below will throw StackOverflowException
@eriawan
eriawan / DiskusiTestArrayExceptionDiTaskWhenAll.csproj
Created June 7, 2025 13:56
Minimum code repro to the "problem of having intermittent exception of System.ArgumentExeption when adding item to List<T> inside Task.WhenAll"
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>