Pidgin

Class Maybe

Constructor functions, extension methods and utilities for working with Maybe<T>.

Inheritance
Declaration
public static class Maybe : Object

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.