{"id":37036379,"url":"https://github.com/polyadic/funcky","last_synced_at":"2026-01-14T04:19:36.738Z","repository":{"id":37978329,"uuid":"175290502","full_name":"polyadic/funcky","owner":"polyadic","description":"Funcky is a Functional Library for C#","archived":false,"fork":false,"pushed_at":"2025-09-16T06:59:41.000Z","size":3896,"stargazers_count":49,"open_issues_count":34,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-17T19:17:55.227Z","etag":null,"topics":["csharp","functional","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://polyadic.github.io/funcky","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polyadic.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE-Apache","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SupportPolicy.md","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}},"created_at":"2019-03-12T20:21:46.000Z","updated_at":"2025-11-08T10:49:01.000Z","dependencies_parsed_at":"2023-09-22T11:51:52.861Z","dependency_job_id":"99db3aa2-2508-480c-989e-a4bb80c8704e","html_url":"https://github.com/polyadic/funcky","commit_stats":{"total_commits":1705,"total_committers":10,"mean_commits":170.5,"dds":0.5513196480938416,"last_synced_commit":"55005d9422e913724601e9166f95be6c79014e12"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/polyadic/funcky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyadic%2Ffuncky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyadic%2Ffuncky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyadic%2Ffuncky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyadic%2Ffuncky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyadic","download_url":"https://codeload.github.com/polyadic/funcky/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyadic%2Ffuncky/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["csharp","functional","hacktoberfest"],"created_at":"2026-01-14T04:19:36.235Z","updated_at":"2026-01-14T04:19:36.729Z","avatar_url":"https://github.com/polyadic.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Funcky\n\nFuncky is a functional library for C# which encourages correct usage of the functional programming paradigm.\n\n[![Build](https://github.com/polyadic/funcky/workflows/Build/badge.svg)](https://github.com/polyadic/funcky/actions?query=workflow%3ABuild)\n[![Licence: MIT](https://img.shields.io/badge/licence-MIT-green)](https://raw.githubusercontent.com/polyadic/funcky/main/LICENSE-MIT)\n[![Licence: Apache](https://img.shields.io/badge/licence-Apache-green)](https://raw.githubusercontent.com/polyadic/funcky/main/LICENSE-Apache)\n\n## Packages\n\n* **Funcky** \\\n  [![NuGet Version](https://img.shields.io/nuget/v/Funcky)](https://www.nuget.org/packages/Funcky)\n* **Funcky.Async** \\\n  [![NuGet Version](https://img.shields.io/nuget/v/Funcky.Async)](https://www.nuget.org/packages/Funcky.Async)\n* **Funcky.XUnit** \\\n  [![NuGet Version](https://img.shields.io/nuget/v/Funcky.XUnit)](https://www.nuget.org/packages/Funcky.XUnit)\n* **Funcky.Analyzers**: Analyzers to guide to the correct usage of Funcky. \\\n  [![NuGet Version](https://img.shields.io/nuget/v/Funcky.Analyzers)](https://www.nuget.org/packages/Funcky.Analyzers)\n* **[Funcky.EntityFrameworkCore](https://github.com/polyadic/funcky-efcore)**: Provides interoperability between Funcky and EF Core \\\n  [![NuGet Version](https://img.shields.io/nuget/v/Funcky.EntityFrameworkCore)](https://www.nuget.org/packages/Funcky.EntityFrameworkCore)\n  [![git: polyadic/funcky-efcore](https://img.shields.io/badge/git-polyadic%2Ffuncky--efcore-blue)](https://github.com/polyadic/funcky-efcore)\n* **[Funcky.DiscriminatedUnion](https://github.com/polyadic/funcky-discriminated-union)**: Provides source generator for discriminated union support in C# \\\n  [![NuGet Version](https://img.shields.io/nuget/v/Funcky.DiscriminatedUnion)](https://www.nuget.org/packages/Funcky.DiscriminatedUnion)\n  [![git: polyadic/funcky-discriminated-union](https://img.shields.io/badge/git-polyadic%2Ffuncky--discriminated--union-blue)](https://github.com/polyadic/funcky-discriminated-union)\n\n## Features\n\nSee our in progress [documentation](https://polyadic.github.io/funcky/) for more examples.\n\n### Option Monad\n\nThe `Option` monad is the centerpiece of Funcky. It provides a safe and easy structure for working with optional values. \\\nIt follows naming already established by LINQ (`Select`, `SelectMany`, `Where`).\n\n```cs\nOption\u003cstring\u003e input = ...;\n\nvar result = input\n    .SelectMany(v =\u003e v.ParseInt32OrNone())\n    .Where(n =\u003e n \u003e= 0)\n    .Select(n =\u003e $\"Non-Zero: {n}\");\n\nresult.AndThen(Console.WriteLine);\n```\n\n### IEnumerable Extensions\n\nFuncky provides a plethora of extensions for `IEnumerable` that help with writing code using Functional programming paradigms.\n\n```cs\nSequence.Return(1, 2, 3, 4)\n    .Pairwise((left, right) =\u003e left + right) // [3, 5, 7]\n    .Intersperse(-1) // [3, -1, 5, -1, 7]\n    .Inspect(item =\u003e Console.WriteLine(item))\n    .SlidingWindow(3) // [[3, -1, 5], [-1, 5, -1], [5, -1, 7]]\n    .WhereSelect(window =\u003e window.AverageOrNone()) // [2, 1, 3]\n    .JoinToString(\", \"); // \"2, 1, 3\"\n```\n\n### … and more\n\n* Extensions that provide interoperability with `Option` for `IQueryable`, `IAsyncEnumerable`, `string`.\n* Fundamental functions: `Identity`, `True`, `False`, etc.\n* «Constructors» for `IEnumerable`: `Sequence.Return`, `Sequence.Successors`, etc.\n* `Unit` type\n* `Result` monad\n* `Reader` monad\n* `Either` monad\n\n## Motivation\n\nFunctional programming is the oldest of the three major programming paradigms, none the less it is the last which gets wide spread usage. Even in languages like C++, Java or C# we want to use a functional style of programming.\n\nLinq is the first Monad which got wide spread use in C#, and most C# programmers were not even aware of it being a monad, which probably helped.\n\nMark Seemann points out that \"Unfortunately, Maybe implementations often come with an API that enables you to ask a Maybe object if it's populated or empty, and a way to extract the value from the Maybe container. This misleads many programmers [...]\"\n\nhttps://blog.ploeh.dk/2019/02/04/how-to-get-the-value-out-of-the-monad/\n\nThis library is based on his example code, and should grow slowly to a library which helps to use and understand the Functional programming paradigm. Functional programming is side-effect free and the strong type system can be used to make illegal state impossible.\n\nUse functional programming as an additional asset to write correct code.\n\n## Documentation\n\n[![Documentation: in progress](https://img.shields.io/badge/documentation-in%20progress-orange)](https://polyadic.github.io/funcky/)\n\n## Other libraries\n\nThere are several libraries available which try to give you more functional features in C#. So\n\n* **Funcky wants to be functional C#.**\n* **Funcky tries to use the C# monadic interfaces as an advantage**\n* **We do not provide our own record type. Use the new [record types] in C# 9 or a weaver like [Equals.Fody].**\n\n### [LanguageExt](https://github.com/louthy/language-ext)\n\nThis library is probably the most complete attempt to functional programming in C#, however it is very opinionated and admits to be not very idiomatic in C#. It certainly is more mature than Funcky and has a lot of features. If you want to go fully functional and for some reason cannot use F# this might be the way to go.\n\n### [Eff](https://github.com/nessos/Eff)\n\nEff is inspired by the Eff programming language and the implementation of Algebraic Effects. It's only purpose is the handling of side effects and using the await syntax in a very elegant way.\n\nWe think the approach is very nice but cumbersome in usage, however we really love the approach with the await syntax. The library is very specialised an can be used in combination with any other functional style library.\n\n### [MoreLinq](https://github.com/morelinq/MoreLINQ/)\n\nMoreLinq provides more extension functions on `IEnumerable`, but has no additional functional concepts. We also provide additional extension functions on `IEnumerable`, but we also try to make them work in combination with our Monads and the async Monad. The different Monad-Syntaxes in C# (Linq, async) do not play niceley together.\n\n### … and more\n\n* [Functional.Primitives.Extensions](https://github.com/JohannesMoersch/Functional)\n* [Functional.Maybe](https://github.com/AndreyTsvetkov/Functional.Maybe)\n* [Tango](https://github.com/gabrielschade/tango)\n\n## License\nLicensed under either of\n\n* Apache License, Version 2.0\n  ([LICENSE-Apache](LICENSE-Apache) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\nContributions are more than welcome. Just open a PR :)\nIf you want something easy to work on, there are a few issues marked with [good first issue].\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\n### Documentation\n\nTo build the documentation you need [mdBook] installed.\nWhen working on the documentation it's useful to have `mdbook` watching and automatically rebuilding on changes:\n\n```bash\nmdbook serve Documentation\n```\n\n## Dependency Policy\n\nThe core `Funcky` package is not allowed to have dependencies. Backwards compatibility packages from Microsoft that are included in\nnewer framework versions (e.g. [`Microsoft.Bcl.AsyncInterfaces`], [`System.Collections.Immutable`]) are exempt from this rule.\n\nInteroperability with other libraries should be provided in separate packages (e.g. `Funcky.Xunit`, [`Funcky.NewtonsoftJson`])\n\n\n[good first issue]: https://github.com/polyadic/funcky/labels/good%20first%20issue\n[mdBook]: https://github.com/rust-lang/mdBook\n[`Funcky.NewtonsoftJson`]: https://github.com/polyadic/funcky-newtonsoftjson\n[`Microsoft.Bcl.AsyncInterfaces`]: https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterfaces\n[`System.Collections.Immutable`]: https://www.nuget.org/packages/System.Collections.Immutable\n[record types]: https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/exploration/records\n[Equals.Fody]: https://github.com/Fody/Equals\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyadic%2Ffuncky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyadic%2Ffuncky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyadic%2Ffuncky/lists"}