FSharpx.Extras


FSharpChoice

Namespace: FSharpx

Static members

Static memberDescription
Ap(f, x)
Signature: (f:Choice<Func<'?7363,'?7364>,'?7365> * x:Choice<'?7363,'?7365>) -> Choice<'?7364,'?7365>
Type parameters: '?7363, '?7364, '?7365
ApValidation(f, x)
Signature: (f:Choice<Func<'?7384,'?7385>,NonEmptyList<'?7386>> * x:Choice<'?7384,NonEmptyList<'?7386>>) -> Choice<'?7385,NonEmptyList<'?7386>>
Type parameters: '?7384, '?7385, '?7386
Cast(o)
Signature: o:obj -> Choice<'?7317,exn>
Type parameters: '?7317

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

EnumerableValidator(f)
Signature: f:Func<'a,Choice<'a,NonEmptyList<'?7398>>> -> Func<seq<'a>,Choice<seq<'a>,NonEmptyList<'?7398>>>
Type parameters: 'a, '?7398
Error(x)
Signature: x:string -> Choice<'?7374,NonEmptyList<string>>
Type parameters: '?7374
Errors(error, errors)
Signature: (error:string * errors:string []) -> Choice<'?7378,NonEmptyList<string>>
Type parameters: '?7378
Errors(x)
Signature: x:NonEmptyList<string> -> Choice<'?7376,NonEmptyList<string>>
Type parameters: '?7376
Join(...)
Signature: (c:Choice<'a,NonEmptyList<'e>> * inner:Choice<'b,NonEmptyList<'e>> * outerKeySelector:Func<'a,'c> * innerKeySelector:Func<'b,'c> * resultSelector:Func<'a,'b,'d>) -> Choice<'d,NonEmptyList<'e>>
Type parameters: 'a, 'e, 'b, 'c, 'd
Match(c, f1, f2, f3)
Signature: (c:Choice<'?7340,'?7341,'?7342> * f1:Action<'?7340> * f2:Action<'?7341> * f3:Action<'?7342>) -> unit
Type parameters: '?7340, '?7341, '?7342
Match(c, f1, f2, f3)
Signature: (c:Choice<'?7335,'?7336,'?7337> * f1:Func<'?7335,'?7338> * f2:Func<'?7336,'?7338> * f3:Func<'?7337,'?7338>) -> '?7338
Type parameters: '?7335, '?7336, '?7337, '?7338
Match(c, f1, f2)
Signature: (c:Choice<'?7332,'?7333> * f1:Action<'?7332> * f2:Action<'?7333>) -> unit
Type parameters: '?7332, '?7333
Match(c, f1, f2)
Signature: (c:Choice<'?7328,'?7329> * f1:Func<'?7328,'?7330> * f2:Func<'?7329,'?7330>) -> '?7330
Type parameters: '?7328, '?7329, '?7330
New1Of2(a)
Signature: a:'T1 -> Choice<'T1,'T2>
Type parameters: 'T1, 'T2
New1Of3(a)
Signature: a:'T1 -> Choice<'T1,'T2,'T3>
Type parameters: 'T1, 'T2, 'T3
New2Of2(b)
Signature: b:'T2 -> Choice<'T1,'T2>
Type parameters: 'T1, 'T2
New2Of3(a)
Signature: a:'T2 -> Choice<'T1,'T2,'T3>
Type parameters: 'T1, 'T2, 'T3
New3Of3(a)
Signature: a:'T3 -> Choice<'T1,'T2,'T3>
Type parameters: 'T1, 'T2, 'T3
Ok(x)
Signature: x:'?7380 -> Choice<'?7380,NonEmptyList<string>>
Type parameters: '?7380
ReturnValidation(x)
Signature: x:'?7395 -> Choice<'?7395,NonEmptyList<string>>
Type parameters: '?7395
Select(o, f)
Signature: (o:Choice<'?7353,'?7354> * f:Func<'?7353,'?7355>) -> Choice<'?7355,'?7354>
Type parameters: '?7353, '?7354, '?7355
SelectMany(o, f, mapper)
Signature: (o:Choice<'?7348,'?7349> * f:Func<'?7348,Choice<'?7350,'?7349>> * mapper:Func<'?7348,'?7350,'?7351>) -> Choice<'?7351,'?7349>
Type parameters: '?7348, '?7349, '?7350, '?7351
SelectMany(o, f)
Signature: (o:Choice<'?7344,'?7345> * f:Func<'?7344,Choice<'?7346,'?7345>>) -> Choice<'?7346,'?7345>
Type parameters: '?7344, '?7345, '?7346
SelectMValidation(x, f)
Signature: (x:'?7391 list * f:Func<'?7391,Choice<'?7392,NonEmptyList<'?7393>>>) -> Choice<'?7392 list,NonEmptyList<'?7393>>
Type parameters: '?7391, '?7392, '?7393
SelectSecond(o, f)
Signature: (o:Choice<'?7367,'?7368> * f:Func<'?7368,'?7369>) -> Choice<'?7367,'?7369>
Type parameters: '?7367, '?7368, '?7369
Sequence(c)
Signature: (c:Choice<'?7371,'?7372> list) -> Choice<'?7371 list,'?7372>
Type parameters: '?7371, '?7372
SequenceValidation(s)
Signature: (s:Choice<'?7388,NonEmptyList<'?7389>> list) -> Choice<'?7388 list,NonEmptyList<'?7389>>
Type parameters: '?7388, '?7389
ToFSharpOption(c)
Signature: c:Choice<'?7319,'?7320> -> '?7319 option
Type parameters: '?7319, '?7320
Try(f, v)
Signature: (f:Func<'?7325,'?7326> * v:'?7325) -> Choice<'?7326,exn>
Type parameters: '?7325, '?7326
Try(f)
Signature: f:Func<'?7322,'?7323> -> Func<'?7322,Choice<'?7323,exn>>
Type parameters: '?7322, '?7323
Validator(p, errorMsg)
Signature: (p:Predicate<'?7382> * errorMsg:string) -> Func<'?7382,Choice<'?7382,NonEmptyList<string>>>
Type parameters: '?7382
Value(c)
Signature: c:Choice<'?7314,'?7315> -> '?7314
Type parameters: '?7314, '?7315

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

Fork me on GitHub