Skip to content

M_RailwaySharp_ErrorHandling_Trial_Lift2__4

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

Trial.Lift2(TSuccess, TMessage, TSuccess1, TMessage1) Method

Promote a function to a monad/applicative, scanning the monadic/applicative arguments from left to right.

Namespace: RailwaySharp.ErrorHandling
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public static Result<TSuccess1, TMessage1> Lift2<TSuccess, TMessage, TSuccess1, TMessage1>(
	Func<TSuccess, Func<TMessage, TSuccess1>> func,
	Result<TSuccess, TMessage1> a,
	Result<TMessage, TMessage1> b
)

VB

Public Shared Function Lift2(Of TSuccess, TMessage, TSuccess1, TMessage1) ( 
	func As Func(Of TSuccess, Func(Of TMessage, TSuccess1)),
	a As Result(Of TSuccess, TMessage1),
	b As Result(Of TMessage, TMessage1)
) As Result(Of TSuccess1, TMessage1)

C++

public:
generic<typename TSuccess, typename TMessage, typename TSuccess1, typename TMessage1>
static Result<TSuccess1, TMessage1>^ Lift2(
	Func<TSuccess, Func<TMessage, TSuccess1>^>^ func, 
	Result<TSuccess, TMessage1>^ a, 
	Result<TMessage, TMessage1>^ b
)

F#

static member Lift2 : 
        func : Func<'TSuccess, Func<'TMessage, 'TSuccess1>> * 
        a : Result<'TSuccess, 'TMessage1> * 
        b : Result<'TMessage, 'TMessage1> -> Result<'TSuccess1, 'TMessage1> 

Parameters

 

func
Type: System.Func(TSuccess, Func(TMessage, TSuccess1))
a
Type: RailwaySharp.ErrorHandling.Result(TSuccess, TMessage1)
b
Type: RailwaySharp.ErrorHandling.Result(TMessage, TMessage1)

Type Parameters

 

TSuccess
TMessage
TSuccess1
TMessage1

Return Value

Type: Result(TSuccess1, TMessage1)

See Also

Reference

Trial Class
RailwaySharp.ErrorHandling Namespace

Clone this wiki locally