FSharpx.Extras


FSharpResult Type

Static members

Static member Description

FSharpResult.Cast(o)

Full Usage: FSharpResult.Cast(o)

Parameters:
    o : obj

Returns: Result<'a, exn>

Attempts to cast an object. Stores the cast value in Ok if successful, otherwise stores the exception in Error

o : obj
Returns: Result<'a, exn>

FSharpResult.Match(c, f1, f2)

Full Usage: FSharpResult.Match(c, f1, f2)

Parameters:
c : Result<'a, 'b>
f1 : Action<'a>
f2 : Action<'b>

FSharpResult.Match(c, f1, f2)

Full Usage: FSharpResult.Match(c, f1, f2)

Parameters:
Returns: 'c
c : Result<'a, 'b>
f1 : Func<'a, 'c>
f2 : Func<'b, 'c>
Returns: 'c

FSharpResult.NewError(b)

Full Usage: FSharpResult.NewError(b)

Parameters:
    b : 'T2

Returns: Result<'T1, 'T2>
b : 'T2
Returns: Result<'T1, 'T2>

FSharpResult.NewOk(a)

Full Usage: FSharpResult.NewOk(a)

Parameters:
    a : 'T1

Returns: Result<'T1, 'T2>
a : 'T1
Returns: Result<'T1, 'T2>

FSharpResult.Select(o, f)

Full Usage: FSharpResult.Select(o, f)

Parameters:
Returns: Result<'c, 'b>
o : Result<'a, 'b>
f : Func<'a, 'c>
Returns: Result<'c, 'b>

FSharpResult.SelectError(o, f)

Full Usage: FSharpResult.SelectError(o, f)

Parameters:
Returns: Result<'a, 'c>
o : Result<'a, 'b>
f : Func<'b, 'c>
Returns: Result<'a, 'c>

FSharpResult.SelectMany(o, f, mapper)

Full Usage: FSharpResult.SelectMany(o, f, mapper)

Parameters:
Returns: Result<'d, 'b>
o : Result<'a, 'b>
f : Func<'a, Result<'c, 'b>>
mapper : Func<'a, 'c, 'd>
Returns: Result<'d, 'b>

FSharpResult.SelectMany(o, f)

Full Usage: FSharpResult.SelectMany(o, f)

Parameters:
Returns: Result<'c, 'b>
o : Result<'a, 'b>
f : Func<'a, Result<'c, 'b>>
Returns: Result<'c, 'b>

FSharpResult.Sequence(c)

Full Usage: FSharpResult.Sequence(c)

Parameters:
Returns: Result<'a list, 'b>
c : Result<'a, 'b> list
Returns: Result<'a list, 'b>

FSharpResult.ToFSharpOption(c)

Full Usage: FSharpResult.ToFSharpOption(c)

Parameters:
Returns: 'a option
c : Result<'a, 'b>
Returns: 'a option

FSharpResult.Value(c)

Full Usage: FSharpResult.Value(c)

Parameters:
Returns: 'a

If Result is Ok, return its value. Otherwise throw ArgumentException.

c : Result<'a, 'b>
Returns: 'a