This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html | |
// original by Nick Palladinos: http://fssnip.net/ip | |
#r "FSharp.PowerPack.Parallel.Seq.dll" | |
module Reducer = | |
open System | |
open System.Text | |
open System.Collections.Generic | |
open System.Linq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL | |
SET VERSION=%1 | |
SET NUGET=buildsupport\nuget.exe | |
FOR %%G IN (packaging\nuget\*.nuspec) DO ( | |
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
using Microsoft.CSharp.RuntimeBinder; | |
namespace MultiMethodsWithDymanic | |
{ | |
[TestFixture] | |
public class MultimethodsTests | |
{ | |
[Test] | |
public void What_is_good_for_rabbit_is_not_good_for_wolf() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using NUnit.Framework; | |
namespace Playground | |
{ | |
[TestFixture] | |
public class EitherTests | |
{ | |
[Test] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL | |
SET VERSION=%1 | |
SET NUGET=buildsupport\nuget.exe | |
FOR %%G IN (packaging\nuget\*.nuspec) DO ( | |
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
// M wants to get an instance via Func | |
static void M(Func<string> factory) | |
{ | |
Console.WriteLine(factory()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/* | |
A basic lens library for the purpose of demonstration. | |
Implements a lens as the costate comonad coalgebra. | |
This library is not complete. | |
A more complete lens library would take from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if NETCOREAPP3_1 | |
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Buffers; | |
using NUnit.Framework; | |
using System.Reflection; | |
using System.Buffers.Binary; | |
using static FastExpressionCompiler.LightExpression.Expression; | |
// ReSharper disable InconsistentNaming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | Method | Mean | Error | StdDev | | |
// |------------- |----------:|----------:|----------:| | |
// | Calli | 0.6718 ns | 0.0013 ns | 0.0012 ns | | |
// | Delegate | 1.1366 ns | 0.0099 ns | 0.0088 ns | | |
// | FastDelegate | 1.6239 ns | 0.0103 ns | 0.0097 ns | | |
// MyClassLib.cs is compiled in another project (havent tested if compiling with Fody is working with BenchmarkDotnet in the same project) | |
// This file is referencing BenchDelegates.MyClassLib | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net5.0</TargetFramework> | |
<LangVersion>preview</LangVersion> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0-preview.3.20215.2" /> | |
</ItemGroup> | |
<ItemGroup> |
OlderNewer