Fin.Collection 0.1.0

Package Description

Install-Package Fin.Collection -Version 0.1.0
dotnet add package Fin.Collection --version 0.1.0
<PackageReference Include="Fin.Collection" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fin.Collection --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Fin

Fin is a functional programming extension for C#

Usage

Curried Functions

Fin has extension methods defined for funcs with 2-6 params with a result. This is important for implementing partial application.

using Fin;

Func<int,int,int> Add = (v1, v2) => v1 + v2;

var add1 = Add.Curry()(1);
var result = add1(2);
// result is 3

Actions to Functions

When action doesn't return a result it's hard to chain functions together. The extension method ToFunc() is defined for actions. Add using Fin; to access these extension methods.

using Fin;

Action<string> printToAction = (toPrintToConsole) => Console.WriteLine(toPrintToConsole)
Func<string,unit> printToFunc = printToAction.ToFunc();

References

Books
Functional Programming in C#
How to write better C# code

Fin

Fin is a functional programming extension for C#

Usage

Curried Functions

Fin has extension methods defined for funcs with 2-6 params with a result. This is important for implementing partial application.

using Fin;

Func<int,int,int> Add = (v1, v2) => v1 + v2;

var add1 = Add.Curry()(1);
var result = add1(2);
// result is 3

Actions to Functions

When action doesn't return a result it's hard to chain functions together. The extension method ToFunc() is defined for actions. Add using Fin; to access these extension methods.

using Fin;

Action<string> printToAction = (toPrintToConsole) => Console.WriteLine(toPrintToConsole)
Func<string,unit> printToFunc = printToAction.ToFunc();

References

Books
Functional Programming in C#
How to write better C# code

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.1.0 102 4/10/2019