{"id":13415211,"url":"https://github.com/louthy/language-ext","last_synced_at":"2025-12-26T12:02:18.290Z","repository":{"id":23371127,"uuid":"26732453","full_name":"louthy/language-ext","owner":"louthy","description":"C# pure functional programming framework - come and get declarative!","archived":false,"fork":false,"pushed_at":"2025-12-21T17:20:39.000Z","size":24222,"stargazers_count":6989,"open_issues_count":9,"forks_count":447,"subscribers_count":184,"default_branch":"main","last_synced_at":"2025-12-22T04:52:28.607Z","etag":null,"topics":["ad-hoc-polymorphism","applicative","bcl","c-sharp","f-sharp","functional-languages","functional-programming","functor","higher-kinded-types","immutable-collections","immutable-types","language-ext","lenses","monad","monad-transformers","monads","monoid","records","semigroup","structural-equality"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/louthy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["louthy"],"patreon":"louthy","ko_fi":"louthy"}},"created_at":"2014-11-16T23:49:58.000Z","updated_at":"2025-12-21T11:25:15.000Z","dependencies_parsed_at":"2024-02-17T02:31:46.446Z","dependency_job_id":"07a3aa8c-03ea-40a5-a865-5fa00b44c5e3","html_url":"https://github.com/louthy/language-ext","commit_stats":{"total_commits":3122,"total_committers":108,"mean_commits":28.90740740740741,"dds":0.4304932735426009,"last_synced_commit":"82c514ce7ad6a89d9482756530fbb7b7bb5b7fcf"},"previous_names":[],"tags_count":130,"template":false,"template_full_name":null,"purl":"pkg:github/louthy/language-ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louthy%2Flanguage-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louthy%2Flanguage-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louthy%2Flanguage-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louthy%2Flanguage-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louthy","download_url":"https://codeload.github.com/louthy/language-ext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louthy%2Flanguage-ext/sbom","scorecard":{"id":410012,"data":{"date":"2025-08-11","repo":{"name":"github.com/louthy/language-ext","commit":"5ae6c3acf39e9cbc123a213c3ecf71a78463d152"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"12 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":3,"reason":"binaries present in source code","details":["Warn: binary detected: pjv/LanguageExt.Core.dll:1","Warn: binary detected: pjv/Newtonsoft.Json.dll:1","Warn: binary detected: pjv/System.Reactive.Core.dll:1","Warn: binary detected: pjv/System.Reactive.Interfaces.dll:1","Warn: binary detected: pjv/System.Reactive.Linq.dll:1","Warn: binary detected: pjv/System.Reactive.PlatformServices.dll:1","Warn: binary detected: pjv/pjv.exe:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: nugetCommand not pinned by hash: pack.sh:14: pin your dependecies by either enabling central package management (https://learn.microsoft.com/nuget/consume-packages/Central-Package-Management) or using a lockfile (https://learn.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies)","Info:   0 out of   1 nugetCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T22:26:18.019Z","repository_id":23371127,"created_at":"2025-08-18T22:26:18.020Z","updated_at":"2025-08-18T22:26:18.020Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28053375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-26T02:00:06.189Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ad-hoc-polymorphism","applicative","bcl","c-sharp","f-sharp","functional-languages","functional-programming","functor","higher-kinded-types","immutable-collections","immutable-types","language-ext","lenses","monad","monad-transformers","monads","monoid","records","semigroup","structural-equality"],"created_at":"2024-07-30T21:00:45.143Z","updated_at":"2025-12-26T12:02:18.284Z","avatar_url":"https://github.com/louthy.png","language":"C#","funding_links":["https://github.com/sponsors/louthy","https://patreon.com/louthy","https://ko-fi.com/louthy"],"categories":["Frameworks, Libraries and Tools","Functional programming","函数式编程","Work Time tools","Results Objects Pattern (Discriminate Unions + Functional Programming)","C#","C# #","框架, 库和工具","Libraries"],"sub_categories":["Functional Programming","响应式编程","[C#](https://github.com/dotnet/roslyn)"],"readme":"![lang-ext](https://raw.githubusercontent.com/louthy/language-ext/main/Images/banner.png)\n\nC# Functional Programming Language Extensions\n=============================================\n\nThis library uses and abuses the features of C# to provide a pure functional-programming framework that, if you squint, can look like \nextensions to the language itself. The desire here is to make programming in C# much more robust by helping the engineer's inertia flow \nin the direction of declarative and pure functional code rather than imperative.  Using these techniques for large code-bases can bring \ntangible benefits to long-term maintenance by removing hidden complexity and by easing the engineer's and team's cognitive load.\n\n[![GitHub Discussions](https://raw.githubusercontent.com/louthy/language-ext/main/Images/discussions.svg)](https://github.com/louthy/language-ext/discussions)\n\n__Author on...__\n* __Blog__: [Notes from a Small Functional Island](https://paullouth.com/)\n* __Bluesky__: [@paullouth.bsky.social](https://bsky.app/profile/paullouth.bsky.social)\n* __Mastodon:__ [@louthy@4four.org](https://4four.org/@louthy)\n* __Github ReadME project__: ['Functional programming is finally going mainstream'](https://github.com/readme/featured/functional-programming)\n\n## Contents\n\n* [Reference](#reference)\n* [Nu-get package](#nu-get)\n* [Getting started](#getting-started)\n* [Prologue](#prologue)\n* [**Features**](#features)\n  * [Functional effects and IO](#functional-effects-and-io)\n  * [Atomic concurrency, shared state, and collections](#atomic-concurrency-and-collections)\n  * [Immutable collections](#immutable-collections)\n  * [Functional streams](#functional-streams)\n  * [Optional and Alternative value monads](#optional-and-alternative-value-monads)\n  * [State managing monads](#state-managing-monads)\n  * [Parser combinators](#parser-combinators)\n  * [Pretty: Produce nicely formatted text with smart layouts](#pretty)\n  * [Differencing](#differencing)\n  * [Traits](#traits)\n  * [Value traits](#value-traits)\n* [Contributing \u0026 Code of Conduct](#contributing--code-of-conduct)\n\n\n## Reference\n\n* [API Reference](https://louthy.github.io/language-ext/)\n* [Issues that contain documentation and examples](https://github.com/louthy/language-ext/issues?utf8=%E2%9C%93\u0026q=is%3Aissue%20label%3A%22examples%20%2F%20documentation%22%20)\n\n## Nu-get\n\nNu-get package | Description\n---------------|-------------\n[LanguageExt.Parsec](https://www.nuget.org/packages/LanguageExt.Parsec) | Port of the [Haskell parsec library](https://hackage.haskell.org/package/parsec)\n[LanguageExt.Streaming](https://www.nuget.org/packages/LanguageExt.Streaming) | A set of compositional streaming types \n[LanguageExt.FSharp](https://www.nuget.org/packages/LanguageExt.FSharp) | F# to C# interop package. Provides interop between the LanguageExt.Core types (like `Option`, `List` and `Map`) to the F# equivalents, as well as interop between core BCL types and F#\n[LanguageExt.Parsec](https://www.nuget.org/packages/LanguageExt.Parsec) | Port of the [Haskell parsec library](https://hackage.haskell.org/package/parsec)\n[LanguageExt.Rx](https://www.nuget.org/packages/LanguageExt.Rx) | Reactive Extensions support for various types within the Core\n[LanguageExt.Sys](https://www.nuget.org/packages/LanguageExt.Sys) | Provides an effects wrapper around the .NET System namespace making common IO operations pure and unit-testable\n\n![lang-ext](https://raw.githubusercontent.com/louthy/language-ext/main/Images/lang-ext-warning.jpg)\n\n## Getting started\n\nTo use this library, simply include `LanguageExt.Core.dll` in your project or grab it from NuGet.  It is also worth setting up some `global using` for your project.  This is the full list that will cover all functionality and bring it into scope:\n```C#\nglobal using LanguageExt;\nglobal using LanguageExt.Common;\nglobal using LanguageExt.Traits;\nglobal using LanguageExt.Effects;\nglobal using LanguageExt.Streaming;\nglobal using LanguageExt.Pretty;\nglobal using LanguageExt.Traits.Domain;\nglobal using static LanguageExt.Prelude;\n```\nA minimum, might be:\n```c#\nglobal using LanguageExt;\nglobal using static LanguageExt.Prelude;\n```\n\nThe namespace `LanguageExt` contains most of the core types; `LanguageExt.Prelude` contains the functions that bring into scope the prelude functions that behave like standalone functions in ML style functional programming languages; `LanguageExt.Traits` brings in the higher-kinded trait-types and many extensions; `LanguageExt.Common` brings in the `Error` type and predefined `Errors`.\n\n## Prologue\nFrom C# 6 onwards we got the ability to treat static classes like namespaces. This means that we can use static \nmethods without qualifying them first. That instantly gives us access to single term method names that look exactly like functions \nin ML-style functional languages. i.e.\n```C#\n    using static System.Console;\n    \n    WriteLine(\"Hello, World\");\n```\nThis library tries to bring some of the functional world into C#. It won't always sit well with the seasoned C# OO programmer, \nespecially the choice of `camelCase` names for a lot of functions and the seeming 'globalness' of a lot of the library. \n\nI can understand that much of this library is non-idiomatic, but when you think of the journey C# has been on, is \"idiomatic\" \nnecessarily right?  A lot of C#'s idioms are inherited from Java and C# 1.0. Since then we've had generics, closures, Func, LINQ, \nasync... C# as a language is becoming more and more like a  functional language on every release. In fact, the bulk of the new \nfeatures are either inspired by or directly taken from features in functional languages. So perhaps it's time to move the C# \nidioms closer to the functional world's idioms?\n\nMy goal with this library is very much to create a whole new community within the larger C# community.  This community is not \nconstrained by the dogma of the past or by the norms of C#.  It understands that the OOP approach to programming has some problems\nand tries to address them head-on.  \n\nAnd for those that say \"just use F#\" or \"just use Haskell\", sure, go do that.  But it's important to remember that C# has a lot\ngoing for it:\n\n* Incredible investment into a state-of-the art compiler\n* Incredible tooling (Visual Studio and Rider)\n* A large ecosystem of open-source libraries\n* A large community of developers already using it\n  * This is also very important for companies that hire engineers\n* It _is_ a functional programming language!  It has first-class functions, lambdas, etc.\n  * And with this library it has a functional-first _Base Class Library_\n\n### A note about naming\n\nOne of the areas that's likely to get seasoned C# heads worked up is my choice of naming style. The intent is to try and make \nsomething that _feels_ like a functional language rather than following rules of naming conventions (mostly set out by \nthe BCL). \n\nThere is, however, a naming guide that will keep you in good stead while reading through this documentation:\n\n* Type names are `PascalCase` in the normal way\n* The types all have constructor functions rather than public constructors that you instantiate with `new`. They will always \nbe `PascalCase`:\n```C#\n    Option\u003cint\u003e x = Some(123);\n    Option\u003cint\u003e y = None;\n    Seq\u003cint\u003e items = Seq(1,2,3,4,5);\n    List\u003cint\u003e items = List(1,2,3,4,5);\n    HashMap\u003cint, string\u003e dict = HashMap((1, \"Hello\"), (2, \"World\"));\n    Map\u003cint, string\u003e dict = Map((1, \"Hello\"), (2, \"World\"));\n```\n* Any (non-type constructor) static function that can be used on its own by `using static LanguageExt.Prelude` are `camelCase`.\n```C#\n    var x = map(opt, v =\u003e v * 2);\n```\n* Any extension methods, or anything \"fluent\" are `PascalCase` in the normal way\n```C#\n    var x = opt.Map(v =\u003e v * 2);\n```\nEven if you disagree with this non-idiomatic approach, all of the `camelCase` static functions have fluent variants, so you never actually have to see the non-standard stuff. \n\n## Features\n\n### [Functional effects and IO](https://louthy.github.io/language-ext/LanguageExt.Core/Effects/index.html)\n\n| Location | Feature      | Description                                                                                                                                                                                              |\n|----------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `IO\u003cA\u003e`      | [A synchronous and asynchronous side-effect: an IO monad](https://louthy.github.io/language-ext/LanguageExt.Core/Effects/IO/index.html)                                                                  |\n| `Core`   | `Eff\u003cA\u003e`     | [A synchronous and asynchronous side-effect with error handling](https://louthy.github.io/language-ext/LanguageExt.Core/Effects/Eff/Eff%20no%20runtime/index.html)                                       |\n| `Core`   | `Eff\u003cRT, A\u003e` | [Same as `Eff\u003cA\u003e` but with an injectable runtime for dependency-injection: a unit testable IO monad](https://louthy.github.io/language-ext/LanguageExt.Core/Effects/Eff/Eff%20with%20runtime/index.html) |\n\n### [Atomic concurrency and collections](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/index.html)\n\n| Location | Feature                            | Description                                                                                                                                            |\n|----------|------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `Atom\u003cA\u003e`                          | [A lock-free atomically mutable reference for working with shared state](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/Atom)      |\n| `Core`   | `Ref\u003cA\u003e`                           | [An atomic reference to be used in the transactional memory system](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/STM)            |\n| `Core`   | `AtomHashMap\u003cK, V\u003e`                | [An immutable `HashMap` with a lock-free atomically mutable reference](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/AtomHashMap) |\n| `Core`   | `AtomSeq\u003cA\u003e`                       | [An immutable `Seq` with a lock-free atomically mutable reference](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/AtomSeq)         |\n| `Core`   | `VectorClock\u003cA\u003e`                   | [Understand distributed causality](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/VectorClock)                                     |\n| `Core`   | `VersionVector\u003cA\u003e`                 | [A vector clock with some versioned data](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/VersionVector)                            |\n| `Core`   | `VersionHashMap \u003cConflictV, K, V\u003e` | [Distrubuted atomic versioning of keys in a hash-map](https://louthy.github.io/language-ext/LanguageExt.Core/Concurrency/VersionHashMap)               |\n\n### [Immutable collections](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/index.html)\n\n| Location | Feature              | Description                                                                                                                                                                                                             |\n|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `Arr\u003cA\u003e`             | [Immutable array](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Arr/index.html)                                                                                                        |\n| `Core`   | `Seq\u003cA\u003e`             | [Lazy immutable list, evaluate at-most-once](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Seq/index.html) - very, very fast!                                                          |\n| `Core`   | `Iterable\u003cA\u003e`        | [Wrapper around `IEnumerable` with support for traits](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Iterable/index.html) - enables the higher-kinded traits to work with enumerables. |\n| `Core`   | `Lst\u003cA\u003e`             | [Immutable list](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/List/index.html) - use `Seq` over `Lst` unless you need `InsertAt`                                                      |\n| `Core`   | `Map\u003cK, V\u003e`          | [Immutable map](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Map/index.html)                                                                                                          |\n| `Core`   | `Map\u003cOrdK, K, V\u003e`    | [Immutable map with Ord constraint on `K`](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Map/index.html)                                                                               |\n| `Core`   | `HashMap\u003cK, V\u003e`      | [Immutable hash-map](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/HashMap/index.html)                                                                                                 |\n| `Core`   | `HashMap\u003cEqK, K, V\u003e` | [Immutable hash-map with Eq constraint on `K`](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/HashMap/index.html)                                                                       |\n| `Core`   | `Set\u003cA\u003e`             | [Immutable set](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Set/index.html)                                                                                                          |\n| `Core`   | `Set\u003cOrdA, A\u003e`       | [Immutable set with Ord constraint on `A`](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Set/index.html)                                                                               |\n| `Core`   | `HashSet\u003cA\u003e`         | [Immutable hash-set](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/HashSet/index.html)                                                                                                 |\n| `Core`   | `HashSet\u003cEqA, A\u003e`    | [Immutable hash-set with Eq constraint on `A`](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/HashSet/index.html)                                                                       |\n| `Core`   | `Que\u003cA\u003e`             | [Immutable queue](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Queue/index.html)                                                                                                      |\n| `Core`   | `Stck\u003cA\u003e`            | [Immutable stack](https://louthy.github.io/language-ext/LanguageExt.Core/Immutable%20Collections/Stack/index.html)                                                                                                      |\n\n### [Functional streams](https://louthy.github.io/language-ext/LanguageExt.Streaming/index.html)\n\n| Location | Feature      | Description                                                                                                                                                                                              |\n|----------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Streaming` | Pipes        | [Connect reusable streaming components into a closed effect](https://louthy.github.io/language-ext/LanguageExt.Streaming/Pipes/)           |\n| `Streaming` | `Sink` | [Entry point to a channel. Sinks receive values and propagate them through a channel](https://louthy.github.io/language-ext/LanguageExt.Streaming/Sink/) |\n| `Streaming` | `SinkT` | [As above but with effects](https://louthy.github.io/language-ext/LanguageExt.Streaming/SinkT/) |\n| `Streaming` | `Source` | [Stream of synchronous or asynchronous values depending on the construction. Values flow downstream and are aggregated with a reducer.](https://louthy.github.io/language-ext/LanguageExt.Streaming/Source/) |\n| `Streaming` | `SourceT` | [As above but with effects](https://louthy.github.io/language-ext/LanguageExt.Streaming/SourceT/) |\n| `Streaming` | `Conduit` | [Represents a channel with an internal queue. The conduit has a `Sink` and a `Source` allowing items to be posted into the conduit, co-mapped, mapped, and consumed.](https://louthy.github.io/language-ext/LanguageExt.Streaming/Conduit) |\n| `Streaming` | `ConduitT` | [As above but with effects: the conduit has a `SinkT` and a `SourceT` allowing items to be posted into the conduit, co-mapped, mapped, and consumed.](https://louthy.github.io/language-ext/LanguageExt.Streaming/ConduitT) |\n\n### [Optional and alternative value monads](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/index.html)\n\n| Location | Feature                         | Description                                                                                                                                                                                              |\n|----------|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `Option\u003cA\u003e`                     | [Option monad](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/Option/index.html)                                                                                     |\n| `Core`   | `OptionT\u003cM, A\u003e`                 | [Option monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/OptionT/index.html)                                                                        |\n| `Core`   | `Either\u003cL,R\u003e`                   | [Right/Left choice monad](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/Either/index.html)                                                                          |\n| `Core`   | `EitherT\u003cL, M, R\u003e`              | [Right/Left choice monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/EitherT/index.html)                                                             |\n| `Core`   | `Fin\u003cA\u003e`                        | [`Error` handling monad, like `Either\u003cError, A\u003e`](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/Fin/index.html)                                                     |\n| `Core`   | `FinT\u003cM, A\u003e`                    | [`Error` handling monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/FinT/index.html)                                                                 |\n| `Core`   | `Try\u003cA\u003e`                        | [Exception handling monad](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/Try/index.html)                                                                            |\n| `Core`   | `TryT\u003cM, A\u003e`                    | [Exception handling monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/TryT/index.html)                                                               |\n| `Core`   | `Validation\u003cFAIL ,SUCCESS\u003e`     | [Validation applicative and monad](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/Validation/index.html) for collecting multiple errors before aborting an operation |\n| `Core`   | `ValidationT\u003cFAIL, M, SUCCESS\u003e` | [Validation applicative and monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/Alternative%20Monads/ValidationT/index.html)                                                |\n\n### [State managing monads](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/State%20and%20Environment%20Monads/index.html)\n\n| Location | Feature            | Description                                                                                                                                                                             |\n|----------|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `Reader\u003cE, A\u003e`     | [Reader monad](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/State%20and%20Environment%20Monads/Reader/Reader/index.html)                                               |\n| `Core`   | `ReaderT\u003cE, M, A\u003e` | [Reader monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/State%20and%20Environment%20Monads/Reader/ReaderT/index.html)                                  |\n| `Core`   | `Writer\u003cW, A\u003e`     | [Writer monad that logs to a `W` constrained to be a Monoid](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/State%20and%20Environment%20Monads/Writer/Writer/index.html) |\n| `Core`   | `WriterT\u003cW, M, A\u003e` | [Writer monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/State%20and%20Environment%20Monads/Writer/WriterT/index.html)                                  |\n| `Core`   | `State\u003cS, A\u003e`      | [State monad](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/State%20and%20Environment%20Monads/State/State/index.html)                                                  |\n| `Core`   | `StateT\u003cS, M, A\u003e`  | [State monad-transformer](https://louthy.github.io/language-ext/LanguageExt.Core/Monads/State%20and%20Environment%20Monads/State/StateT/index.html)                                     |\n\n### [Parser combinators](https://louthy.github.io/language-ext/LanguageExt.Parsec/index.html)\n\n| Location | Feature        | Description                                                                                                                    |\n|----------|----------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `Parsec` | `Parser\u003cA\u003e`    | [String parser monad and full parser combinators library](https://louthy.github.io/language-ext/LanguageExt.Parsec/index.html) |\n| `Parsec` | `Parser\u003cI, O\u003e` | [Parser monad that can work with any input stream type](https://louthy.github.io/language-ext/LanguageExt.Parsec/index.html)   |\n\n### [Pretty](https://louthy.github.io/language-ext/LanguageExt.Core/Pretty/index.html)\n\n| Location | Feature  | Description                                      |\n|----------|----------|--------------------------------------------------|\n| `Core`   | `Doc\u003cA\u003e` | Produce nicely formatted text with smart layouts |\n\n### [Differencing](https://louthy.github.io/language-ext/LanguageExt.Core/DataTypes/Patch/index.html)\n\n| Location | Feature         | Description                                                                                                                                                                                                                          |\n|----------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `Patch\u003cEqA, A\u003e` | Uses patch-theory to efficiently calculate the difference (`Patch.diff(list1, list2)`) between two collections of `A` and build a patch which can be applied (`Patch.apply(patch, list)`) to one to make the other (think git diff). |\n\n### [Traits](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/index.html)\n\nThe traits are major feature of `v5`+ language-ext that makes generic programming with higher-kinds a reality.  Check out Paul's [series on Higher Kinds](https://paullouth.com/higher-kinds-in-c-with-language-ext/) to get a deeper insight.\n\n| Location | Feature                                | Description                                                                                                                                                            |\n|----------|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `Applicative\u003cF\u003e`                       | [Applicative functor](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Applicative/index.html)                                                            |\n| `Core`   | `Eq\u003cA\u003e`                                | [Ad-hoc equality trait](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Eq/index.html)                                                                   |\n| `Core`   | `Fallible\u003cF\u003e`                          | [Trait that describes types that can fail](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Fallible/index.html)                                          |\n| `Core`   | `Foldable\u003cT\u003e`                          | [Aggregation over a structure](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Foldable/index.html)                                                      |\n| `Core`   | `Functor\u003cF\u003e`                           | [Functor `Map`](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Functor/index.html)                                                                      |\n| `Core`   | `Has\u003cM, TRAIT\u003e`                        | [Used in runtimes to enable DI-like capabilities](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Has/index.html)                                        |\n| `Core`   | `Hashable\u003cA\u003e`                          | [Ad-hoc has-a-hash-code trait](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Hashable/index.html)                                                      |\n| `Core`   | `Local\u003cM, E\u003e`                          | [Creates a local environment to run a computation ](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Local/index.html)                                    |\n| `Core`   | `Monad\u003cM\u003e`                             | [Monad trait](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Monads/Monad/index.html)                                                                   |\n| `Core`   | `MonadT\u003cM, N\u003e`                         | [Monad transformer trait](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Monads/MonadT/index.html)                                                      |\n| `Core`   | `Monoid\u003cA\u003e`                            | [A monoid is a type with an identity `Empty` and an associative binary operation `+`](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Monoid/index.html) |\n| `Core`   | `MonoidK\u003cM\u003e`                           | [Equivalent of monoids for working on higher-kinded types](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/MonoidK/index.html)                           |\n| `Core`   | `Mutates\u003cM, OUTER_STATE, INNER_STATE\u003e` | [Used in runtimes to enable stateful operations](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Mutates/index.html)                                     |\n| `Core`   | `Ord\u003cA\u003e`                               | [Ad-hoc ordering / comparisons](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Ord/index.html)                                                          |\n| `Core`   | `Range\u003cSELF, NumOrdA, A\u003e`              | [Abstraction of a range of values](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Range/index.html)                                                     |\n| `Core`   | `Readable\u003cM, Env\u003e`                     | [Generalised Reader monad abstraction](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Readable/index.html)                                              |\n| `Core`   | `Semigroup\u003cA\u003e`                         | [Provides an associative binary operation `+`](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Semigroup/index.html)                                     |\n| `Core`   | `SemigroupK\u003cM\u003e`                        | [Equivalent of semigroups for working with higher-kinded types](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/SemigroupK/index.html)                   |\n| `Core`   | `Stateful\u003cM, S\u003e`                       | [Generalised State monad abstraction](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Stateful/index.html)                                               |\n| `Core`   | `Traversable\u003cT\u003e`                       | [Traversable structures support element-wise sequencing of Applicative effects](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Traversable/index.html)  |\n| `Core`   | `Writable\u003cM, W\u003e`                       | [Generalised Writer monad abstraction](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Writable/index.html)                                              |\n\n### [Value traits](https://louthy.github.io/language-ext/LanguageExt.Core/Traits/Domain/index.html)\n\nThese work a little like type-aliasing but they impart semantic meaning and some common operators for the underlying value.\n\n| Location | Feature                              | Description                                                                                                                                                                                                                                       |\n|----------|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Core`   | `DomainType\u003cSELF, REPR\u003e`             | Provides a mapping from `SELF` to an underlying representation: `REPR`                                                                                                                                                                            |\n| `Core`   | `Identifier \u003cSELF\u003e`                  | Identifiers (like IDs in databases: `PersonId` for example), they are equivalent to `DomaintType` with equality.                                                                                                                                  |\n| `Core`   | `VectorSpace\u003cSELF, SCALAR\u003e`          | Scalable values; can add and subtract self, but can only multiply and divide by a scalar. Can also negate.                                                                                                                                        |\n| `Core`   | `Amount \u003cSELF, SCALAR\u003e`              | Quantities, such as the amount of money in USD on a bank account or a file size in bytes. Derives `VectorSpace`, `IdentifierLike`, `DomainType`, and is orderable (comparable).                                                                   |\n| `Core`   | `Locus \u003cSELF, DISTANCE, SCALAR\u003e`     | Works with space-like structures. Spaces have absolute and relative distances. Has an origin/zero point and derives `DomainType`, `IdentifierLike`, `AmountLike` and `VectorSpace`.  `DISTANCE` must also be an `AmountLike\u003cSELF, REPR, SCALAR\u003e`. |\n\n_These features are still a little in-flux as of 17th Oct 2024 - they may evolve, be renamed, or removed - but I like the idea!_\n\n## Further \n\nFor some non-reference like documentation:\n\n* Paul's blog: [Notes from a Small Functional Island](https://paullouth.com/) does deep dives into the philosophy of FP and the inner-workings of language-ext.\n* [The wiki](https://github.com/louthy/language-ext/wiki) has some additional documentation, some might be a little out of date since the big `v5` refactor, but should give some good insights.\n\n## Contributing \u0026 Code of Conduct\n\nIf you would like to get involved with this project, please first read the [Contribution Guidelines](https://github.com/louthy/language-ext/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/louthy/language-ext/blob/main/CODE_OF_CONDUCT.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouthy%2Flanguage-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouthy%2Flanguage-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouthy%2Flanguage-ext/lists"}