190 packages tagged with “Maybe”
CSharpFunctionalExtensions - functional extensions for C#
Optional is a robust option/maybe type for C#.
Binaries for the Option type. Visit https://github.com/tejacques/Option for an overview and usage examples.
Option types for C# with LINQ support and rich fluent syntax for many popular uses: var maybeOne = "one".ToMaybe(); Maybe<string> maybeAnother; var maybeBoth = from one in maybeOne from another in maybeAnother select one + another; maybeBoth.Match( both => Console.WriteLine("Result is: {0}", both), @else: () => Console.WriteLine("Result is Nothing, as one of the inputs was Nothing") );
Async extensions for Nils Lück's Optional library.
Maybe/Optional monad implementation for C#. For more information see http://csharp-functional.readthedocs.io/en/latest/maybe-monad.html.
DEPRECATED: Optional.Extensions has been replaced by more specific packages. Check out Optional.Collections, Optional.Utilities etc. Extended functionality for Optional.
This package includes implementation of Maybe, Try, Either with set of utility extension methods.
An option type for .NET.
A lightweight wrapper type for optional values.
Implements an option type (Strilanc.Value.May<T>) that encourages usage based on pattern matching rather than ForceGetValue. Also includes utility methods for producing, consuming and transforming May<T>. Note on null: May<T> treats null like any other value. May.NoValue is distinct from null, and both are distinct from ((object)null).Maybe().
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). * Indexed enumerations, * Cycle() methods that endlessly repeat an enumeration, 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, basic parameter piping support.
A collection of useful types and operations on types.
Option types for C# with LINQ support and rich fluent syntax
.NET library that provide mainly functional features for C#. This means concept of Option, Result, Either and ValueObject. Supported platforms: - .NET Standard 1.0+ - .NET Core 1.0+ - .NET Framework 2.0+ Supports Source Link
C# implementation of functional concepts: Maybe (Option), Either (Result), Try, Memoize
Various useful functionality for Optional.
Simple optional types with basic helpers
Provides a class and a few extension methods to facilitate common operations with values that may or may not exist. Traditionally, programmers often use `null` references to represent values that "aren't there", but the problem is that this was never their intended purpose. - Languages like C# don't provide a way to differentiate between reference variables that can be null and those that are guaranteed not to be. - The inventor of null references has [apologized](http://en.wikipedia.org/wiki/Tony_Hoare#Quotations) for creating them in the first place, calling them his "billion-dollar mistake." - This misuse of null references has spread far and wide, leading to the unfortunately-named `Nullable<>` type (which, being a value type, is never actually null), and attributes like `[CanBeNull]` and `[NotNull]` to help programmers know when they can expect a method to treat a null value as legitimate input. All this leaves us in a position where our best hope of avoiding `NullReferenceException`s lies in trying to make sure that our reference variables are *never* null. But in that case, how do we indicate when a value is *optional*? Well, that's where `Maybe<>` comes in.
Useful Optional extensions for working with collections.
A library providing optional/Maybe functionality for .NET
C# Maybe monad
Simple optional type for .NET
Maybe is monads implementation for .NET
This project provides the monads Maybe(of T) and Try(of T), both with full support for modern async/await code.
Provides a set of types that provide null safety and functional chaining, to enable a functional-like programming style in C#.
A lightweight & fluent Option/Optional/Maybe Implementation supporting .NET Standard
A set of extensions methods to help working with nullable types by implementing the Maybe monad on top of `T?`. Documentation: https://github.com/bert2/Nullable.Extensions Release notes: Add new `Else()` extension.
Nelibur.Sword is a library to take with you in the battle of Clean Code.