Skip to content

M_CSharpx_Either_Bind__3

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

Either.Bind(TLeft, TRight, TResult) Method

Monadic bind.

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

Syntax

C#

public static Either<TLeft, TResult> Bind<TLeft, TRight, TResult>(
	Either<TLeft, TRight> either,
	Func<TRight, Either<TLeft, TResult>> func
)

VB

Public Shared Function Bind(Of TLeft, TRight, TResult) ( 
	either As Either(Of TLeft, TRight),
	func As Func(Of TRight, Either(Of TLeft, TResult))
) As Either(Of TLeft, TResult)

C++

public:
generic<typename TLeft, typename TRight, typename TResult>
static Either<TLeft, TResult>^ Bind(
	Either<TLeft, TRight>^ either, 
	Func<TRight, Either<TLeft, TResult>^>^ func
)

F#

static member Bind : 
        either : Either<'TLeft, 'TRight> * 
        func : Func<'TRight, Either<'TLeft, 'TResult>> -> Either<'TLeft, 'TResult> 

Parameters

 

either
Type: CSharpx.Either(TLeft, TRight)
func
Type: System.Func(TRight, Either(TLeft, TResult))

Type Parameters

 

TLeft
TRight
TResult

Return Value

Type: Either(TLeft, TResult)

See Also

Reference

Either Class
CSharpx Namespace

Clone this wiki locally