FSharpx.Extras


FSharpChoice Type

Static members

Static member Description

FSharpChoice.Ap(f, x)

Full Usage: FSharpChoice.Ap(f, x)

Parameters:
Returns: Choice<'b, 'c>
f : Choice<Func<'a, 'b>, 'c>
x : Choice<'a, 'c>
Returns: Choice<'b, 'c>

FSharpChoice.ApValidation(f, x)

Full Usage: FSharpChoice.ApValidation(f, x)

Parameters:
Returns: Choice<'b, NonEmptyList<'c>>
f : Choice<Func<'a, 'b>, NonEmptyList<'c>>
x : Choice<'a, NonEmptyList<'c>>
Returns: Choice<'b, NonEmptyList<'c>>

FSharpChoice.Cast(o)

Full Usage: FSharpChoice.Cast(o)

Parameters:
    o : obj

Returns: Choice<'a, exn>

Attempts to cast an object. Stores the cast value in 1Of2 if successful, otherwise stores the exception in 2Of2

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

FSharpChoice.EnumerableValidator(f)

Full Usage: FSharpChoice.EnumerableValidator(f)

Parameters:
Returns: Func<'a seq, Choice<'a seq, NonEmptyList<'b>>>
f : Func<'a, Choice<'a, NonEmptyList<'b>>>
Returns: Func<'a seq, Choice<'a seq, NonEmptyList<'b>>>

FSharpChoice.Error(x)

Full Usage: FSharpChoice.Error(x)

Parameters:
    x : string

Returns: Choice<'a, NonEmptyList<string>>
x : string
Returns: Choice<'a, NonEmptyList<string>>

FSharpChoice.Errors(error, errors)

Full Usage: FSharpChoice.Errors(error, errors)

Parameters:
    error : string
    errors : string[]

Returns: Choice<'a, NonEmptyList<string>>
error : string
errors : string[]
Returns: Choice<'a, NonEmptyList<string>>

FSharpChoice.Errors(x)

Full Usage: FSharpChoice.Errors(x)

Parameters:
Returns: Choice<'a, NonEmptyList<string>>
x : NonEmptyList<string>
Returns: Choice<'a, NonEmptyList<string>>

FSharpChoice.Join(c, inner, outerKeySelector, innerKeySelector, resultSelector)

Full Usage: FSharpChoice.Join(c, inner, outerKeySelector, innerKeySelector, resultSelector)

Parameters:
Returns: Choice<'d, NonEmptyList<'e>>
c : Choice<'a, NonEmptyList<'e>>
inner : Choice<'b, NonEmptyList<'e>>
outerKeySelector : Func<'a, 'c>
innerKeySelector : Func<'b, 'c>
resultSelector : Func<'a, 'b, 'd>
Returns: Choice<'d, NonEmptyList<'e>>

FSharpChoice.Match(c, f1, f2, f3)

Full Usage: FSharpChoice.Match(c, f1, f2, f3)

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

FSharpChoice.Match(c, f1, f2, f3)

Full Usage: FSharpChoice.Match(c, f1, f2, f3)

Parameters:
Returns: 'd
c : Choice<'a, 'b, 'c>
f1 : Func<'a, 'd>
f2 : Func<'b, 'd>
f3 : Func<'c, 'd>
Returns: 'd

FSharpChoice.Match(c, f1, f2)

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

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

FSharpChoice.Match(c, f1, f2)

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

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

FSharpChoice.New1Of2(a)

Full Usage: FSharpChoice.New1Of2(a)

Parameters:
    a : 'T1

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

FSharpChoice.New1Of3(a)

Full Usage: FSharpChoice.New1Of3(a)

Parameters:
    a : 'T1

Returns: Choice<'T1, 'T2, 'T3>
a : 'T1
Returns: Choice<'T1, 'T2, 'T3>

FSharpChoice.New2Of2(b)

Full Usage: FSharpChoice.New2Of2(b)

Parameters:
    b : 'T2

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

FSharpChoice.New2Of3(a)

Full Usage: FSharpChoice.New2Of3(a)

Parameters:
    a : 'T2

Returns: Choice<'T1, 'T2, 'T3>
a : 'T2
Returns: Choice<'T1, 'T2, 'T3>

FSharpChoice.New3Of3(a)

Full Usage: FSharpChoice.New3Of3(a)

Parameters:
    a : 'T3

Returns: Choice<'T1, 'T2, 'T3>
a : 'T3
Returns: Choice<'T1, 'T2, 'T3>

FSharpChoice.Ok(x)

Full Usage: FSharpChoice.Ok(x)

Parameters:
    x : 'a

Returns: Choice<'a, NonEmptyList<string>>
x : 'a
Returns: Choice<'a, NonEmptyList<string>>

FSharpChoice.ReturnValidation(x)

Full Usage: FSharpChoice.ReturnValidation(x)

Parameters:
    x : 'a

Returns: Choice<'a, NonEmptyList<string>>
x : 'a
Returns: Choice<'a, NonEmptyList<string>>

FSharpChoice.Select(o, f)

Full Usage: FSharpChoice.Select(o, f)

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

FSharpChoice.SelectMValidation(x, f)

Full Usage: FSharpChoice.SelectMValidation(x, f)

Parameters:
Returns: Choice<'b list, NonEmptyList<'c>>
x : 'a list
f : Func<'a, Choice<'b, NonEmptyList<'c>>>
Returns: Choice<'b list, NonEmptyList<'c>>

FSharpChoice.SelectMany(o, f, mapper)

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

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

FSharpChoice.SelectMany(o, f)

Full Usage: FSharpChoice.SelectMany(o, f)

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

FSharpChoice.SelectSecond(o, f)

Full Usage: FSharpChoice.SelectSecond(o, f)

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

FSharpChoice.Sequence(c)

Full Usage: FSharpChoice.Sequence(c)

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

FSharpChoice.SequenceValidation(s)

Full Usage: FSharpChoice.SequenceValidation(s)

Parameters:
Returns: Choice<'a list, NonEmptyList<'b>>
s : Choice<'a, NonEmptyList<'b>> list
Returns: Choice<'a list, NonEmptyList<'b>>

FSharpChoice.ToFSharpOption(c)

Full Usage: FSharpChoice.ToFSharpOption(c)

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

FSharpChoice.Try(f, v)

Full Usage: FSharpChoice.Try(f, v)

Parameters:
    f : Func<'a, 'b>
    v : 'a

Returns: Choice<'b, exn>
f : Func<'a, 'b>
v : 'a
Returns: Choice<'b, exn>

FSharpChoice.Try(f)

Full Usage: FSharpChoice.Try(f)

Parameters:
Returns: Func<'a, Choice<'b, exn>>
f : Func<'a, 'b>
Returns: Func<'a, Choice<'b, exn>>

FSharpChoice.Validator(p, errorMsg)

Full Usage: FSharpChoice.Validator(p, errorMsg)

Parameters:
Returns: Func<'a, Choice<'a, NonEmptyList<string>>>
p : Predicate<'a>
errorMsg : string
Returns: Func<'a, Choice<'a, NonEmptyList<string>>>

FSharpChoice.Value(c)

Full Usage: FSharpChoice.Value(c)

Parameters:
Returns: 'a

If Choice is 1Of2, return its value. Otherwise throw ArgumentException.

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