This commit is contained in:
Sanchime 2022-05-08 14:57:11 +08:00
parent 2db90d3767
commit 2317a58f39
2 changed files with 24 additions and 1 deletions

View File

@ -1 +1,19 @@
Console.WriteLine("Hello World!");
using Sanchime.Functional.Core.Products;
using Sanchime.Functional.Core.Extensions;
using Sanchime.Toolkits;
// Test<int> test = new Test<int>();
// Console.WriteLine(test.Map((Test<int> x) => {x.Value = 2; return x;}).Value);
// Console.WriteLine(test.Value);
foo(10);
foo(Option.None);
void foo(Option<int> option)
{
var res = option.Map(x => x + 2);
res.WriteLine();
}

View File

@ -1,5 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Sanchime.Functional\Sanchime.Functional.csproj" />
<ProjectReference Include="..\Sanchime.Toolkits\Sanchime.Toolkits.csproj" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>