Class Maybe
Constructor functions, extension methods and utilities for working with Maybe<T>.
Inheritance
- object
- Maybe
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()
Declaration
public static class Maybe
Methods
Just<T>(T)
Creates a Maybe<T> containing a value.
Declaration
public static Maybe<T> Just<T>(T value)
Parameters
Type | Name | Description |
---|---|---|
T |
value |
The value of the new Maybe<T>. |
Returns
Type | Description |
---|---|
Maybe<T> |
A Maybe<T> containing the specified value. |
Type Parameters
Name | Description |
---|---|
T |
The type of the contained value. |
Nothing<T>()
Creates a Maybe<T> containing no value.
Declaration
public static Maybe<T> Nothing<T>()
Returns
Type | Description |
---|---|
Maybe<T> |
A Maybe<T> containing no. |
Type Parameters
Name | Description |
---|---|
T |
The type of the absent value. |