FSharpx.Extras


Validation Module

Types

Type Description

CustomValidation<'T>

NonEmptyListSemigroup<'T>

NonEmptyListValidation<'T>

Functions and values

Function or value Description

x *> y

Full Usage: x *> y

Parameters:
Returns: Choice<'c, NonEmptyList<'b>>
Modifiers: inline

Sequence actions, discarding the value of the first argument.

x : Choice<'a, NonEmptyList<'b>>
y : Choice<'c, NonEmptyList<'b>>
Returns: Choice<'c, NonEmptyList<'b>>

x <* y

Full Usage: x <* y

Parameters:
Returns: Choice<'a, NonEmptyList<'b>>
Modifiers: inline

Sequence actions, discarding the value of the second argument.

x : Choice<'a, NonEmptyList<'b>>
y : Choice<'c, NonEmptyList<'b>>
Returns: Choice<'a, NonEmptyList<'b>>

f <*> x

Full Usage: f <*> x

Parameters:
Returns: Choice<'b, NonEmptyList<'c>>
Modifiers: inline

Sequential application

f : Choice<('a -> 'b), NonEmptyList<'c>>
x : Choice<'a, NonEmptyList<'c>>
Returns: Choice<'b, NonEmptyList<'c>>

ap x

Full Usage: ap x

Parameters:
Returns: Choice<('f -> 'h), NonEmptyList<'g>> -> Choice<'h, NonEmptyList<'g>>
Modifiers: inline
Type parameters: 'f, 'g, 'h

Sequential application

x : Choice<'f, NonEmptyList<'g>>
Returns: Choice<('f -> 'h), NonEmptyList<'g>> -> Choice<'h, NonEmptyList<'g>>

apa append x f

Full Usage: apa append x f

Parameters:
    append : 'a -> 'a -> 'a
    x : Choice<'b, 'a>
    f : Choice<('b -> 'c), 'a>

Returns: Choice<'c, 'a>

Sequential application, parameterized by append

append : 'a -> 'a -> 'a
x : Choice<'b, 'a>
f : Choice<('b -> 'c), 'a>
Returns: Choice<'c, 'a>

apm m

Full Usage: apm m

Parameters:
Returns: Choice<'b, 'a> -> Choice<('b -> 'c), 'a> -> Choice<'c, 'a>
Modifiers: inline

Sequential application, parameterized by semigroup

m : ISemigroup<'a>
Returns: Choice<'b, 'a> -> Choice<('b -> 'c), 'a> -> Choice<'c, 'a>

lift2 f a b

Full Usage: lift2 f a b

Parameters:
Returns: Choice<'c, NonEmptyList<'d>>
Modifiers: inline

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

f : 'a -> 'b -> 'c
a : Choice<'a, NonEmptyList<'d>>
b : Choice<'b, NonEmptyList<'d>>
Returns: Choice<'c, NonEmptyList<'d>>

mapM f x

Full Usage: mapM f x

Parameters:
Returns: Choice<'e list, NonEmptyList<'f>>
Modifiers: inline
Type parameters: 'd, 'e, 'f
f : 'd -> Choice<'e, NonEmptyList<'f>>
x : 'd list
Returns: Choice<'e list, NonEmptyList<'f>>

mapMIgnore f x

Full Usage: mapMIgnore f x

Parameters:
Returns: Choice<unit, NonEmptyList<'c>>
Modifiers: inline
f : 'a -> Choice<'b, NonEmptyList<'c>>
x : 'a list
Returns: Choice<unit, NonEmptyList<'c>>

seqValidator f

Full Usage: seqValidator f

Parameters:
Returns: 'b seq -> Choice<'c list, NonEmptyList<'d>>
f : 'b -> Choice<'c, NonEmptyList<'d>>
Returns: 'b seq -> Choice<'c list, NonEmptyList<'d>>

sequence s

Full Usage: sequence s

Parameters:
Returns: Choice<'c list, NonEmptyList<'d>>
Modifiers: inline
Type parameters: 'c, 'd
s : Choice<'c, NonEmptyList<'d>> list
Returns: Choice<'c list, NonEmptyList<'d>>

sequenceIgnore s

Full Usage: sequenceIgnore s

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

Active patterns

Active pattern Description

(|Success|Failure|) _arg1

Full Usage: (|Success|Failure|) _arg1

Parameters:
Returns: Choice<'a, 'b>
_arg1 : Choice<'a, 'b>
Returns: Choice<'a, 'b>