Skip to content

M_CSharpx_Either_Bimap__4

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

Either.Bimap(TLeft, TRight, TLeft1, TRight1) Method

Maps both parts of a Either type. Applies the first function if Either is Left. Otherwise applies the second function.

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

Syntax

C#

public static Either<TLeft1, TRight1> Bimap<TLeft, TRight, TLeft1, TRight1>(
	Either<TLeft, TRight> either,
	Func<TLeft, TLeft1> mapLeft,
	Func<TRight, TRight1> mapRight
)

VB

Public Shared Function Bimap(Of TLeft, TRight, TLeft1, TRight1) ( 
	either As Either(Of TLeft, TRight),
	mapLeft As Func(Of TLeft, TLeft1),
	mapRight As Func(Of TRight, TRight1)
) As Either(Of TLeft1, TRight1)

C++

public:
generic<typename TLeft, typename TRight, typename TLeft1, typename TRight1>
static Either<TLeft1, TRight1>^ Bimap(
	Either<TLeft, TRight>^ either, 
	Func<TLeft, TLeft1>^ mapLeft, 
	Func<TRight, TRight1>^ mapRight
)

F#

static member Bimap : 
        either : Either<'TLeft, 'TRight> * 
        mapLeft : Func<'TLeft, 'TLeft1> * 
        mapRight : Func<'TRight, 'TRight1> -> Either<'TLeft1, 'TRight1> 

Parameters

 

either
Type: CSharpx.Either(TLeft, TRight)
mapLeft
Type: System.Func(TLeft, TLeft1)
mapRight
Type: System.Func(TRight, TRight1)

Type Parameters

 

TLeft
TRight
TLeft1
TRight1

Return Value

Type: Either(TLeft1, TRight1)

See Also

Reference

Either Class
CSharpx Namespace

Clone this wiki locally