Skip to content
Discriminated unions, pattern matching and partial applications for C#
C# HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
artifacts Added SuccincT.JSON projects targeting .dot core and universal apps. … Mar 21, 2017
docs Finishing up for v3.2 May 18, 2018
src Updates for nuget. The nuget icon feature still seems to be broken th… Feb 17, 2020
tests Enabled NRT feature for SuccincT.JSON. Plus prep for the v4 release Feb 17, 2020
.editorconfig #57 - All structs (public and internal) are now readonly structs. All… Sep 6, 2019
.gitignore Merge (with changes) of branch 'union-performance' of https://github.… Mar 27, 2017
Directory.Build.props Updates for nuget. The nuget icon feature still seems to be broken th… Feb 17, 2020
LICENSE.txt Updates for nuget. The nuget icon feature still seems to be broken th… Feb 17, 2020
README.md Updates for nuget. The nuget icon feature still seems to be broken th… Feb 17, 2020
SuccincT.JSON.png Added missing images for the SuccincT.JSON nuget package Jan 25, 2017
SuccincT.JSON.pspimage Added missing images for the SuccincT.JSON nuget package Jan 25, 2017
SuccincT.png Re-worked the icon as the original was a complete failure at 32x32 pi… Jun 17, 2015
SuccincT.pspimage Re-worked the icon as the original was a complete failure at 32x32 pi… Jun 17, 2015
SuccincT.sln Changed version to v4 and added src and tests solution folders Sep 9, 2019
SuccincT.sln.DotSettings Final code tidy-up ready for the v4.0 release Feb 7, 2020
appveyor.yml AppVeyor build failed as the lang version was set to preview. Changed… Feb 7, 2020

README.md

Succinc<T>

Discriminated unions, pattern matching and partial applications for C#

Current project status

Status
Master branch Build Status (master)
Current release NuGet

Overview

Succinc<T> is a .NET library that adds a number of functional features to C#:

  • Discriminated unions,
  • Pattern matching,
  • Partial applications,
  • "Implicitly" typed lambdas,
  • The ability to treat void methods as Unit functions,
  • Replacements for TryParse methods that return an Option<T> (or Maybe<T>, if you prefer), rather than using the out parameter anti-pattern.
  • "cons" support for IEnumerable<T> (add elements to the head of an enumeration, or split an enumeration into its head element and an enumeration containing the remaining items, all without repeatedly enumerating that enumerable).
  • Cycle() methods that endlessly repeat an enumeration or array, again without repeatedly enumerating that enumerable).
  • Replacements for IEnumerable<T>'s XXXOrDefault methods that return an Option<T> (or Maybe<T>, if you prefer), avoiding null and the "did it return a value, or the default?" problem,
  • And finally, as an experimental feature at this stage, forward pipe support.

For more details of each of these feature, please refer to the wiki.

Serialization

V2.2.0 saw the introduction of of JSON.Net serialization support for Succinc<T>. Using the Succinc<T> serializers, all types can now be correctly serialized/deserialized to JSON.

For details, see the Serializing to JSON wiki page.

Current Release

The current release of Succinc<T> is v4.0.0, which is available as a nuget package that supports .NET 4.6.1+, .NET Core v2.0+ and numerous other frameworks (.NET Standard 2.0).

This release also includes SuccincT.Json v4.0.0, which is available as a separate nuget package that supports .NET 4.6.1+, .NET Core v2.0+ and numerous other frameworks (.NET Standard 2.0). SuccincT.Json is dependent on Succinc<T>, so will pull that package in as part of the install. Also, please note that this nuget package is also dependent on the Newtonsoft.JSON v12.0+ nuget package.

What's planned?

The next release is expected to be v4.1.0. For details of what planned, please see the SuccincT Roadmap for details.

Forking and Contributing

If you wish to fork this repo and build it on your own machine, please refer to the Branches page for details of the currently active branches.

If you wish to contribute in any way (from saying "hi" to submitting a PR), please refer to the Contributing page.

You can’t perform that action at this time.