Preparing search index...
The search index is not available
Houston Common Library
Houston Common Library
@45drives/houston-common-lib
monet
Validation
Interface Validation<E, T>
Basic Monad Interface
interface
Validation
<
E
,
T
>
{
@@type
:
string
;
acc
(
)
:
monet
.
Validation
<
E
,
monet
.
IValidationAcc
>
;
ap
<
V
>
(
eitherFn
:
monet
.
Validation
<
E
,
(
(
val
:
T
)
=>
V
)
>
)
:
monet
.
Validation
<
E
,
V
>
;
apTo
<
V
>
(
value
:
monet
.
Validation
<
E
,
V
>
)
:
T
extends
(
(
arg
:
V
)
=>
any
)
?
monet
.
Validation
<
E
,
ReturnType
<
T
<
T
>
>
>
:
never
;
bimap
<
F
,
V
>
(
fnF
:
(
(
fail
:
E
)
=>
F
)
,
fnS
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Validation
<
F
,
V
>
;
bind
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
)
:
monet
.
Validation
<
E
,
V
>
;
cata
<
Z
>
(
failFn
:
(
(
fail
:
E
)
=>
Z
)
,
successFn
:
(
(
val
:
T
)
=>
Z
)
)
:
Z
;
catchMap
<
F
>
(
fn
:
(
(
fail
:
E
)
=>
monet
.
Validation
<
F
,
T
>
)
)
:
monet
.
Validation
<
F
,
T
>
;
chain
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
)
:
monet
.
Validation
<
E
,
V
>
;
equals
(
other
:
monet
.
Validation
<
E
,
T
>
)
:
boolean
;
fail
(
)
:
E
;
failMap
<
F
>
(
fn
:
(
(
fail
:
E
)
=>
F
)
)
:
monet
.
Validation
<
F
,
T
>
;
fantasy-land/ap
?
<
V
>
(
afn
:
monet
.
Applicative
<
(
(
val
:
T
)
=>
V
)
>
)
:
monet
.
Applicative
<
V
>
;
fantasy-land/chain
?
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Chain
<
V
>
)
)
:
monet
.
Chain
<
V
>
;
fantasy-land/equals
?
(
other
:
monet
.
Validation
<
E
,
T
>
)
:
boolean
;
fantasy-land/map
?
<
V
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Functor
<
V
>
;
flatMap
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
)
:
monet
.
Validation
<
E
,
V
>
;
fold
<
Z
>
(
failFn
:
(
(
fail
:
E
)
=>
Z
)
,
successFn
:
(
(
val
:
T
)
=>
Z
)
)
:
Z
;
foldLeft
<
V
>
(
initial
:
V
)
:
(
(
fn
:
(
(
acc
:
V
,
val
:
T
)
=>
V
)
)
=>
V
)
;
foldRight
<
V
>
(
initial
:
V
)
:
(
(
fn
:
(
(
val
:
T
,
acc
:
V
)
=>
V
)
)
=>
V
)
;
forEach
(
fn
:
(
(
val
:
T
)
=>
void
)
)
:
void
;
forEachFail
(
fn
:
(
(
val
:
E
)
=>
void
)
)
:
void
;
isFail
(
)
:
boolean
;
isSuccess
(
)
:
boolean
;
join
<
V
>
(
)
:
monet
.
Validation
<
E
,
V
>
;
map
<
V
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Validation
<
E
,
V
>
;
success
(
)
:
T
;
swap
(
)
:
monet
.
Validation
<
T
,
E
>
;
takeLeft
(
m
:
monet
.
Validation
<
E
,
T
>
)
:
monet
.
Validation
<
E
,
T
>
;
takeRight
(
m
:
monet
.
Validation
<
E
,
T
>
)
:
monet
.
Validation
<
E
,
T
>
;
toEither
(
)
:
monet
.
Either
<
E
,
T
>
;
toMaybe
(
)
:
monet
.
Maybe
<
T
>
;
}
Type Parameters
E
T
Hierarchy-Diagram
Legend
interface
public method
Hierarchy (
view full
)
monet
.
IMonad
<
T
>
monet
.
Setoid
<
monet
.
Validation
<
E
,
T
>
>
monet
.
ITraversable
<
T
>
monet
.
Catamorphism
<
E
,
T
>
Validation
Index
Properties
@@type
Methods
acc
ap
ap
To
bimap
bind
cata
catch
Map
chain
equals
fail
fail
Map
fantasy-
land/ap?
fantasy-
land/chain?
fantasy-
land/equals?
fantasy-
land/map?
flat
Map
fold
fold
Left
fold
Right
for
Each
for
Each
Fail
is
Fail
is
Success
join
map
success
swap
take
Left
take
Right
to
Either
to
Maybe
Properties
@@type
@@type
:
string
Methods
acc
acc
(
)
:
monet
.
Validation
<
E
,
monet
.
IValidationAcc
>
Returns
monet
.
Validation
<
E
,
monet
.
IValidationAcc
>
ap
ap
<
V
>
(
eitherFn
:
monet
.
Validation
<
E
,
(
(
val
:
T
)
=>
V
)
>
)
:
monet
.
Validation
<
E
,
V
>
Type Parameters
V
Parameters
eitherFn
:
monet
.
Validation
<
E
,
(
(
val
:
T
)
=>
V
)
>
Returns
monet
.
Validation
<
E
,
V
>
ap
To
ap
To
<
V
>
(
value
:
monet
.
Validation
<
E
,
V
>
)
:
T
extends
(
(
arg
:
V
)
=>
any
)
?
monet
.
Validation
<
E
,
ReturnType
<
T
<
T
>
>
>
:
never
Type Parameters
V
Parameters
value
:
monet
.
Validation
<
E
,
V
>
Returns
T
extends
(
(
arg
:
V
)
=>
any
)
?
monet
.
Validation
<
E
,
ReturnType
<
T
<
T
>
>
>
:
never
bimap
bimap
<
F
,
V
>
(
fnF
:
(
(
fail
:
E
)
=>
F
)
,
fnS
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Validation
<
F
,
V
>
Type Parameters
F
V
Parameters
fnF
:
(
(
fail
:
E
)
=>
F
)
(
fail
:
E
)
:
F
Parameters
fail
:
E
Returns
F
fnS
:
(
(
val
:
T
)
=>
V
)
(
val
:
T
)
:
V
Parameters
val
:
T
Returns
V
Returns
monet
.
Validation
<
F
,
V
>
bind
bind
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
)
:
monet
.
Validation
<
E
,
V
>
Type Parameters
V
Parameters
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
(
val
:
T
)
:
monet
.
Validation
<
E
,
V
>
Parameters
val
:
T
Returns
monet
.
Validation
<
E
,
V
>
Returns
monet
.
Validation
<
E
,
V
>
cata
cata
<
Z
>
(
failFn
:
(
(
fail
:
E
)
=>
Z
)
,
successFn
:
(
(
val
:
T
)
=>
Z
)
)
:
Z
Type Parameters
Z
Parameters
failFn
:
(
(
fail
:
E
)
=>
Z
)
(
fail
:
E
)
:
Z
Parameters
fail
:
E
Returns
Z
successFn
:
(
(
val
:
T
)
=>
Z
)
(
val
:
T
)
:
Z
Parameters
val
:
T
Returns
Z
Returns
Z
catch
Map
catch
Map
<
F
>
(
fn
:
(
(
fail
:
E
)
=>
monet
.
Validation
<
F
,
T
>
)
)
:
monet
.
Validation
<
F
,
T
>
Type Parameters
F
Parameters
fn
:
(
(
fail
:
E
)
=>
monet
.
Validation
<
F
,
T
>
)
(
fail
:
E
)
:
monet
.
Validation
<
F
,
T
>
Parameters
fail
:
E
Returns
monet
.
Validation
<
F
,
T
>
Returns
monet
.
Validation
<
F
,
T
>
chain
chain
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
)
:
monet
.
Validation
<
E
,
V
>
Type Parameters
V
Parameters
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
(
val
:
T
)
:
monet
.
Validation
<
E
,
V
>
Parameters
val
:
T
Returns
monet
.
Validation
<
E
,
V
>
Returns
monet
.
Validation
<
E
,
V
>
equals
equals
(
other
:
monet
.
Validation
<
E
,
T
>
)
:
boolean
Parameters
other
:
monet
.
Validation
<
E
,
T
>
Returns
boolean
fail
fail
(
)
:
E
Returns
E
fail
Map
fail
Map
<
F
>
(
fn
:
(
(
fail
:
E
)
=>
F
)
)
:
monet
.
Validation
<
F
,
T
>
Type Parameters
F
Parameters
fn
:
(
(
fail
:
E
)
=>
F
)
(
fail
:
E
)
:
F
Parameters
fail
:
E
Returns
F
Returns
monet
.
Validation
<
F
,
T
>
Optional
fantasy-
land/ap
fantasy-
land/ap
<
V
>
(
afn
:
monet
.
Applicative
<
(
(
val
:
T
)
=>
V
)
>
)
:
monet
.
Applicative
<
V
>
Type Parameters
V
Parameters
afn
:
monet
.
Applicative
<
(
(
val
:
T
)
=>
V
)
>
Returns
monet
.
Applicative
<
V
>
Optional
fantasy-
land/chain
fantasy-
land/chain
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Chain
<
V
>
)
)
:
monet
.
Chain
<
V
>
Type Parameters
V
Parameters
fn
:
(
(
val
:
T
)
=>
monet
.
Chain
<
V
>
)
(
val
:
T
)
:
monet
.
Chain
<
V
>
Parameters
val
:
T
Returns
monet
.
Chain
<
V
>
Returns
monet
.
Chain
<
V
>
Optional
fantasy-
land/equals
fantasy-
land/equals
(
other
:
monet
.
Validation
<
E
,
T
>
)
:
boolean
Parameters
other
:
monet
.
Validation
<
E
,
T
>
Returns
boolean
Optional
fantasy-
land/map
fantasy-
land/map
<
V
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Functor
<
V
>
Type Parameters
V
Parameters
fn
:
(
(
val
:
T
)
=>
V
)
(
val
:
T
)
:
V
Parameters
val
:
T
Returns
V
Returns
monet
.
Functor
<
V
>
flat
Map
flat
Map
<
V
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
)
:
monet
.
Validation
<
E
,
V
>
Type Parameters
V
Parameters
fn
:
(
(
val
:
T
)
=>
monet
.
Validation
<
E
,
V
>
)
(
val
:
T
)
:
monet
.
Validation
<
E
,
V
>
Parameters
val
:
T
Returns
monet
.
Validation
<
E
,
V
>
Returns
monet
.
Validation
<
E
,
V
>
fold
fold
<
Z
>
(
failFn
:
(
(
fail
:
E
)
=>
Z
)
,
successFn
:
(
(
val
:
T
)
=>
Z
)
)
:
Z
Type Parameters
Z
Parameters
failFn
:
(
(
fail
:
E
)
=>
Z
)
(
fail
:
E
)
:
Z
Parameters
fail
:
E
Returns
Z
successFn
:
(
(
val
:
T
)
=>
Z
)
(
val
:
T
)
:
Z
Parameters
val
:
T
Returns
Z
Returns
Z
fold
Left
fold
Left
<
V
>
(
initial
:
V
)
:
(
(
fn
:
(
(
acc
:
V
,
val
:
T
)
=>
V
)
)
=>
V
)
Type Parameters
V
Parameters
initial
:
V
Returns
(
(
fn
:
(
(
acc
:
V
,
val
:
T
)
=>
V
)
)
=>
V
)
(
fn
:
(
(
acc
:
V
,
val
:
T
)
=>
V
)
)
:
V
Parameters
fn
:
(
(
acc
:
V
,
val
:
T
)
=>
V
)
(
acc
:
V
,
val
:
T
)
:
V
Parameters
acc
:
V
val
:
T
Returns
V
Returns
V
fold
Right
fold
Right
<
V
>
(
initial
:
V
)
:
(
(
fn
:
(
(
val
:
T
,
acc
:
V
)
=>
V
)
)
=>
V
)
Type Parameters
V
Parameters
initial
:
V
Returns
(
(
fn
:
(
(
val
:
T
,
acc
:
V
)
=>
V
)
)
=>
V
)
(
fn
:
(
(
val
:
T
,
acc
:
V
)
=>
V
)
)
:
V
Parameters
fn
:
(
(
val
:
T
,
acc
:
V
)
=>
V
)
(
val
:
T
,
acc
:
V
)
:
V
Parameters
val
:
T
acc
:
V
Returns
V
Returns
V
for
Each
for
Each
(
fn
:
(
(
val
:
T
)
=>
void
)
)
:
void
Parameters
fn
:
(
(
val
:
T
)
=>
void
)
(
val
:
T
)
:
void
Parameters
val
:
T
Returns
void
Returns
void
for
Each
Fail
for
Each
Fail
(
fn
:
(
(
val
:
E
)
=>
void
)
)
:
void
Parameters
fn
:
(
(
val
:
E
)
=>
void
)
(
val
:
E
)
:
void
Parameters
val
:
E
Returns
void
Returns
void
is
Fail
is
Fail
(
)
:
boolean
Returns
boolean
is
Success
is
Success
(
)
:
boolean
Returns
boolean
join
join
<
V
>
(
)
:
monet
.
Validation
<
E
,
V
>
Type Parameters
V
Returns
monet
.
Validation
<
E
,
V
>
map
map
<
V
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Validation
<
E
,
V
>
Type Parameters
V
Parameters
fn
:
(
(
val
:
T
)
=>
V
)
(
val
:
T
)
:
V
Parameters
val
:
T
Returns
V
Returns
monet
.
Validation
<
E
,
V
>
success
success
(
)
:
T
Returns
T
swap
swap
(
)
:
monet
.
Validation
<
T
,
E
>
Returns
monet
.
Validation
<
T
,
E
>
take
Left
take
Left
(
m
:
monet
.
Validation
<
E
,
T
>
)
:
monet
.
Validation
<
E
,
T
>
Parameters
m
:
monet
.
Validation
<
E
,
T
>
Returns
monet
.
Validation
<
E
,
T
>
take
Right
take
Right
(
m
:
monet
.
Validation
<
E
,
T
>
)
:
monet
.
Validation
<
E
,
T
>
Parameters
m
:
monet
.
Validation
<
E
,
T
>
Returns
monet
.
Validation
<
E
,
T
>
to
Either
to
Either
(
)
:
monet
.
Either
<
E
,
T
>
Returns
monet
.
Either
<
E
,
T
>
to
Maybe
to
Maybe
(
)
:
monet
.
Maybe
<
T
>
Returns
monet
.
Maybe
<
T
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
@@type
acc
ap
ap
To
bimap
bind
cata
catch
Map
chain
equals
fail
fail
Map
fantasy-
land/ap
fantasy-
land/chain
fantasy-
land/equals
fantasy-
land/map
flat
Map
fold
fold
Left
fold
Right
for
Each
for
Each
Fail
is
Fail
is
Success
join
map
success
swap
take
Left
take
Right
to
Either
to
Maybe
Official Cockpit API Documentation
Houston Common Library
Loading...
Basic Monad Interface