Functional programming and other utilities for C# (pre-release).
Every source file contains conditional compilation symbols to change type visibility from public to internal and set other preferences.
Source files are conceived to be manually added to other projects or by setting a reference via Paket. See these paket.dependencies and paket.references as example.
- C# native implementation of F#
'T option
/ Haskelldata Maybe a = Just a | Nothing
type.
- C# native implementation of Haskell
data Either a b = Left a | Right b
type. - Similar also to F#
Choice<'T, 'U>
. - Like in Haskell the convention is to let
Right
case hold the value andLeft
keep track of error or similar data. - If you want a better implementation of this kind of data, please check my C# port of Chessie, named RailwaySharp.
- Most useful extension methods from code.google.com/p/morelinq/.
- With other useful methods too.
- Equivalent to F#
unit
.
- Identity monadic type.
- The use of this monad can be easly replaced by direct function application.
- Actually
Maybe.cs
andEnumerableExtensions.cs
are the more mature implementations. - I'm working for adding tests, time allowing.
- Please report any your thought.