Skip to content

M_CSharpx_EitherExtensions_Bimap__4

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

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

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

Syntax

C#

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

VB

<ExtensionAttribute>
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:
[ExtensionAttribute]
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#

[<ExtensionAttribute>]
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)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Either(TLeft, TRight). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

EitherExtensions Class
CSharpx Namespace

Clone this wiki locally