Skip to content

T_CSharpx_Maybe

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

Maybe Class

Provides static methods for manipulating Maybe.

Inheritance Hierarchy

System.Object
  CSharpx.Maybe
Namespace: CSharpx
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

internal static class Maybe

VB

Friend NotInheritable Class Maybe

C++

internal ref class Maybe abstract sealed

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
type Maybe =  class end

The Maybe type exposes the following members.

Methods

 

Name Description
Public methodStatic member Bind(T1, T2) Sequentially compose two actions, passing any value produced by the first as an argument to the second.
Public methodStatic member Just(T) Builds the case when Maybe contains a value.
Public methodStatic member Map(T1, T2) Transforms an maybe value by using a specified mapping function.
Public methodStatic member Merge(T1, T2) If both maybes contain a value, it merges them into a maybe with a tupled value.
Public methodStatic member Nothing(T) Builds the empty case of Maybe.
Public methodStatic member Return(T) Inject a value into the monadic Maybe(T) type.
  Back to Top

See Also

Reference

CSharpx Namespace

Clone this wiki locally