Preparing search index...
The search index is not available
Houston Common Library
Houston Common Library
@45drives/houston-common-lib
monet
Maybe
Interface Maybe<T>
Maybe
interface
Maybe
<
T
extends
NonNullable
<
{}
>
>
{
[iterator]
(
)
:
Iterator
<
T
,
any
,
undefined
>
;
ap
<
V
extends
{}
>
(
maybeFn
:
monet
.
Maybe
<
(
(
val
:
T
)
=>
V
)
>
)
:
monet
.
Maybe
<
V
>
;
apTo
<
V
extends
{}
>
(
value
:
monet
.
Maybe
<
V
>
)
:
T
extends
(
(
arg
:
V
)
=>
any
)
?
monet
.
Maybe
<
ReturnType
<
T
<
T
>
>
>
:
never
;
bind
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
)
:
monet
.
Maybe
<
V
>
;
cata
<
Z
>
(
none
:
(
(
)
=>
Z
)
,
some
:
(
(
val
:
T
)
=>
Z
)
)
:
Z
;
catchMap
(
fn
:
(
(
)
=>
monet
.
Maybe
<
T
>
)
)
:
monet
.
Maybe
<
T
>
;
chain
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
)
:
monet
.
Maybe
<
V
>
;
contains
(
val
:
T
)
:
boolean
;
equals
(
other
:
monet
.
Maybe
<
T
>
)
:
boolean
;
every
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
;
exists
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
;
fantasy-land/equals
?
(
other
:
monet
.
Maybe
<
T
>
)
:
boolean
;
filter
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
monet
.
Maybe
<
U
>
;
filter
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
monet
.
Maybe
<
T
>
;
filterNot
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
monet
.
Maybe
<
Exclude
<
T
,
U
>
>
;
filterNot
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
monet
.
Maybe
<
T
>
;
flatMap
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
)
:
monet
.
Maybe
<
V
>
;
fold
<
V
>
(
val
:
V
)
:
(
(
fn
:
(
(
val
:
T
)
=>
V
)
)
=>
V
)
;
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
;
forall
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
;
getOrElse
(
val
:
T
)
:
T
;
isJust
(
)
:
boolean
;
isNone
(
)
:
boolean
;
isNothing
(
)
:
boolean
;
isSome
(
)
:
boolean
;
join
<
V
>
(
)
:
T
extends
monet
.
Maybe
<
V
>
?
V
:
never
;
just
(
)
:
T
;
map
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Maybe
<
V
>
;
orElse
(
maybe
:
monet
.
Maybe
<
T
>
)
:
monet
.
Maybe
<
T
>
;
orElseRun
(
fn
:
(
(
)
=>
void
)
)
:
void
;
orJust
(
val
:
T
)
:
T
;
orLazy
(
fn
:
(
(
)
=>
undefined
|
null
|
T
)
)
:
T
;
orNoneIf
(
val
:
boolean
)
:
monet
.
Maybe
<
T
>
;
orNothingIf
(
val
:
boolean
)
:
monet
.
Maybe
<
T
>
;
orNull
(
)
:
null
|
T
;
orSome
(
val
:
T
)
:
T
;
orUndefined
(
)
:
undefined
|
T
;
some
(
)
:
T
;
takeLeft
(
m
:
monet
.
Maybe
<
T
>
)
:
monet
.
Maybe
<
T
>
;
takeRight
(
m
:
monet
.
Maybe
<
T
>
)
:
monet
.
Maybe
<
T
>
;
to
<
I
extends
Iterable
<
T
>
>
(
ctor
:
(
(
iter
:
Iterable
<
T
>
)
=>
I
)
)
:
I
;
toArray
(
)
:
T
[]
;
toEither
<
E
>
(
left
?:
E
)
:
monet
.
Either
<
E
,
T
>
;
toList
(
)
:
monet
.
List
<
T
>
;
toSet
(
)
:
Set
<
T
>
;
toValidation
<
E
>
(
fail
?:
E
)
:
monet
.
Validation
<
E
,
T
>
;
}
Type Parameters
T
extends
NonNullable
<
{}
>
Hierarchy-Diagram
Legend
interface
public method
Hierarchy (
view full
)
monet
.
Setoid
<
monet
.
Maybe
<
T
>
>
monet
.
ITraversable
<
T
>
monet
.
Catamorphism
<
undefined
,
T
>
Iterable
<
T
>
Maybe
Index
Methods
[iterator]
ap
ap
To
bind
cata
catch
Map
chain
contains
equals
every
exists
fantasy-
land/equals?
filter
filter
Not
flat
Map
fold
fold
Left
fold
Right
for
Each
forall
get
Or
Else
is
Just
is
None
is
Nothing
is
Some
join
just
map
or
Else
or
Else
Run
or
Just
or
Lazy
or
None
If
or
Nothing
If
or
Null
or
Some
or
Undefined
some
take
Left
take
Right
to
to
Array
to
Either
to
List
to
Set
to
Validation
Methods
[iterator]
[iterator]
(
)
:
Iterator
<
T
,
any
,
undefined
>
Returns
Iterator
<
T
,
any
,
undefined
>
ap
ap
<
V
extends
{}
>
(
maybeFn
:
monet
.
Maybe
<
(
(
val
:
T
)
=>
V
)
>
)
:
monet
.
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
maybeFn
:
monet
.
Maybe
<
(
(
val
:
T
)
=>
V
)
>
Returns
monet
.
Maybe
<
V
>
ap
To
ap
To
<
V
extends
{}
>
(
value
:
monet
.
Maybe
<
V
>
)
:
T
extends
(
(
arg
:
V
)
=>
any
)
?
monet
.
Maybe
<
ReturnType
<
T
<
T
>
>
>
:
never
Type Parameters
V
extends
{}
Parameters
value
:
monet
.
Maybe
<
V
>
Returns
T
extends
(
(
arg
:
V
)
=>
any
)
?
monet
.
Maybe
<
ReturnType
<
T
<
T
>
>
>
:
never
bind
bind
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
)
:
monet
.
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
(
val
:
T
)
:
monet
.
Maybe
<
V
>
Parameters
val
:
T
Returns
monet
.
Maybe
<
V
>
Returns
monet
.
Maybe
<
V
>
cata
cata
<
Z
>
(
none
:
(
(
)
=>
Z
)
,
some
:
(
(
val
:
T
)
=>
Z
)
)
:
Z
Type Parameters
Z
Parameters
none
:
(
(
)
=>
Z
)
(
)
:
Z
Returns
Z
some
:
(
(
val
:
T
)
=>
Z
)
(
val
:
T
)
:
Z
Parameters
val
:
T
Returns
Z
Returns
Z
catch
Map
catch
Map
(
fn
:
(
(
)
=>
monet
.
Maybe
<
T
>
)
)
:
monet
.
Maybe
<
T
>
Parameters
fn
:
(
(
)
=>
monet
.
Maybe
<
T
>
)
(
)
:
monet
.
Maybe
<
T
>
Returns
monet
.
Maybe
<
T
>
Returns
monet
.
Maybe
<
T
>
chain
chain
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
)
:
monet
.
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
(
val
:
T
)
:
monet
.
Maybe
<
V
>
Parameters
val
:
T
Returns
monet
.
Maybe
<
V
>
Returns
monet
.
Maybe
<
V
>
contains
contains
(
val
:
T
)
:
boolean
Parameters
val
:
T
Returns
boolean
equals
equals
(
other
:
monet
.
Maybe
<
T
>
)
:
boolean
Parameters
other
:
monet
.
Maybe
<
T
>
Returns
boolean
every
every
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
Parameters
fn
:
(
(
e
:
T
)
=>
boolean
)
(
e
:
T
)
:
boolean
Parameters
e
:
T
Returns
boolean
Returns
boolean
exists
exists
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
Parameters
fn
:
(
(
e
:
T
)
=>
boolean
)
(
e
:
T
)
:
boolean
Parameters
e
:
T
Returns
boolean
Returns
boolean
Optional
fantasy-
land/equals
fantasy-
land/equals
(
other
:
monet
.
Maybe
<
T
>
)
:
boolean
Parameters
other
:
monet
.
Maybe
<
T
>
Returns
boolean
filter
filter
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
monet
.
Maybe
<
U
>
Type Parameters
U
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
val
is
U
)
(
val
:
T
)
:
val
is
U
Parameters
val
:
T
Returns
val
is
U
Returns
monet
.
Maybe
<
U
>
filter
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
monet
.
Maybe
<
T
>
Parameters
fn
:
(
(
val
:
T
)
=>
boolean
)
(
val
:
T
)
:
boolean
Parameters
val
:
T
Returns
boolean
Returns
monet
.
Maybe
<
T
>
filter
Not
filter
Not
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
monet
.
Maybe
<
Exclude
<
T
,
U
>
>
Type Parameters
U
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
val
is
U
)
(
val
:
T
)
:
val
is
U
Parameters
val
:
T
Returns
val
is
U
Returns
monet
.
Maybe
<
Exclude
<
T
,
U
>
>
filter
Not
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
monet
.
Maybe
<
T
>
Parameters
fn
:
(
(
val
:
T
)
=>
boolean
)
(
val
:
T
)
:
boolean
Parameters
val
:
T
Returns
boolean
Returns
monet
.
Maybe
<
T
>
flat
Map
flat
Map
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
)
:
monet
.
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
monet
.
Maybe
<
V
>
)
(
val
:
T
)
:
monet
.
Maybe
<
V
>
Parameters
val
:
T
Returns
monet
.
Maybe
<
V
>
Returns
monet
.
Maybe
<
V
>
fold
fold
<
V
>
(
val
:
V
)
:
(
(
fn
:
(
(
val
:
T
)
=>
V
)
)
=>
V
)
Type Parameters
V
Parameters
val
:
V
Returns
(
(
fn
:
(
(
val
:
T
)
=>
V
)
)
=>
V
)
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
V
Parameters
fn
:
(
(
val
:
T
)
=>
V
)
(
val
:
T
)
:
V
Parameters
val
:
T
Returns
V
Returns
V
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
forall
forall
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
Parameters
fn
:
(
(
e
:
T
)
=>
boolean
)
(
e
:
T
)
:
boolean
Parameters
e
:
T
Returns
boolean
Returns
boolean
get
Or
Else
get
Or
Else
(
val
:
T
)
:
T
Parameters
val
:
T
Returns
T
is
Just
is
Just
(
)
:
boolean
Returns
boolean
is
None
is
None
(
)
:
boolean
Returns
boolean
is
Nothing
is
Nothing
(
)
:
boolean
Returns
boolean
is
Some
is
Some
(
)
:
boolean
Returns
boolean
join
join
<
V
>
(
)
:
T
extends
monet
.
Maybe
<
V
>
?
V
:
never
Type Parameters
V
Returns
T
extends
monet
.
Maybe
<
V
>
?
V
:
never
just
just
(
)
:
T
Returns
T
map
map
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
monet
.
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
V
)
(
val
:
T
)
:
V
Parameters
val
:
T
Returns
V
Returns
monet
.
Maybe
<
V
>
or
Else
or
Else
(
maybe
:
monet
.
Maybe
<
T
>
)
:
monet
.
Maybe
<
T
>
Parameters
maybe
:
monet
.
Maybe
<
T
>
Returns
monet
.
Maybe
<
T
>
or
Else
Run
or
Else
Run
(
fn
:
(
(
)
=>
void
)
)
:
void
Parameters
fn
:
(
(
)
=>
void
)
(
)
:
void
Returns
void
Returns
void
or
Just
or
Just
(
val
:
T
)
:
T
Parameters
val
:
T
Returns
T
or
Lazy
or
Lazy
(
fn
:
(
(
)
=>
undefined
|
null
|
T
)
)
:
T
Parameters
fn
:
(
(
)
=>
undefined
|
null
|
T
)
(
)
:
undefined
|
null
|
T
Returns
undefined
|
null
|
T
Returns
T
or
None
If
or
None
If
(
val
:
boolean
)
:
monet
.
Maybe
<
T
>
Parameters
val
:
boolean
Returns
monet
.
Maybe
<
T
>
or
Nothing
If
or
Nothing
If
(
val
:
boolean
)
:
monet
.
Maybe
<
T
>
Parameters
val
:
boolean
Returns
monet
.
Maybe
<
T
>
or
Null
or
Null
(
)
:
null
|
T
Returns
null
|
T
or
Some
or
Some
(
val
:
T
)
:
T
Parameters
val
:
T
Returns
T
or
Undefined
or
Undefined
(
)
:
undefined
|
T
Returns
undefined
|
T
some
some
(
)
:
T
Returns
T
take
Left
take
Left
(
m
:
monet
.
Maybe
<
T
>
)
:
monet
.
Maybe
<
T
>
Parameters
m
:
monet
.
Maybe
<
T
>
Returns
monet
.
Maybe
<
T
>
take
Right
take
Right
(
m
:
monet
.
Maybe
<
T
>
)
:
monet
.
Maybe
<
T
>
Parameters
m
:
monet
.
Maybe
<
T
>
Returns
monet
.
Maybe
<
T
>
to
to
<
I
extends
Iterable
<
T
>
>
(
ctor
:
(
(
iter
:
Iterable
<
T
>
)
=>
I
)
)
:
I
Type Parameters
I
extends
Iterable
<
T
>
Parameters
ctor
:
(
(
iter
:
Iterable
<
T
>
)
=>
I
)
(
iter
:
Iterable
<
T
>
)
:
I
Parameters
iter
:
Iterable
<
T
>
Returns
I
Returns
I
to
Array
to
Array
(
)
:
T
[]
Returns
T
[]
to
Either
to
Either
<
E
>
(
left
?:
E
)
:
monet
.
Either
<
E
,
T
>
Type Parameters
E
Parameters
Optional
left
:
E
Returns
monet
.
Either
<
E
,
T
>
to
List
to
List
(
)
:
monet
.
List
<
T
>
Returns
monet
.
List
<
T
>
to
Set
to
Set
(
)
:
Set
<
T
>
Returns
Set
<
T
>
to
Validation
to
Validation
<
E
>
(
fail
?:
E
)
:
monet
.
Validation
<
E
,
T
>
Type Parameters
E
Parameters
Optional
fail
:
E
Returns
monet
.
Validation
<
E
,
T
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
[iterator]
ap
ap
To
bind
cata
catch
Map
chain
contains
equals
every
exists
fantasy-
land/equals
filter
filter
Not
flat
Map
fold
fold
Left
fold
Right
for
Each
forall
get
Or
Else
is
Just
is
None
is
Nothing
is
Some
join
just
map
or
Else
or
Else
Run
or
Just
or
Lazy
or
None
If
or
Nothing
If
or
Null
or
Some
or
Undefined
some
take
Left
take
Right
to
to
Array
to
Either
to
List
to
Set
to
Validation
Official Cockpit API Documentation
Houston Common Library
Loading...
Maybe