Preparing search index...
The search index is not available
Houston Common Library
Houston Common Library
@45drives/houston-common-ui
Maybe
Interface Maybe<T>
Maybe
interface
Maybe
<
T
extends
NonNullable
<
{}
>
>
{
[iterator]
(
)
:
Iterator
<
T
,
any
,
undefined
>
;
ap
<
V
extends
{}
>
(
maybeFn
:
Maybe
<
(
(
val
:
T
)
=>
V
)
>
)
:
Maybe
<
V
>
;
apTo
<
V
extends
{}
>
(
value
:
Maybe
<
V
>
)
:
T
extends
(
(
arg
:
V
)
=>
any
)
?
Maybe
<
ReturnType
<
T
<
T
>
>
>
:
never
;
bind
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
)
:
Maybe
<
V
>
;
cata
<
Z
>
(
none
:
(
(
)
=>
Z
)
,
some
:
(
(
val
:
T
)
=>
Z
)
)
:
Z
;
catchMap
(
fn
:
(
(
)
=>
Maybe
<
T
>
)
)
:
Maybe
<
T
>
;
chain
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
)
:
Maybe
<
V
>
;
contains
(
val
:
T
)
:
boolean
;
equals
(
other
:
Maybe
<
T
>
)
:
boolean
;
every
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
;
exists
(
fn
:
(
(
e
:
T
)
=>
boolean
)
)
:
boolean
;
fantasy-land/equals
?
(
other
:
Maybe
<
T
>
)
:
boolean
;
filter
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
Maybe
<
U
>
;
filter
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
Maybe
<
T
>
;
filterNot
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
Maybe
<
Exclude
<
T
,
U
>
>
;
filterNot
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
Maybe
<
T
>
;
flatMap
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
)
:
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
Maybe
<
V
>
?
V
:
never
;
just
(
)
:
T
;
map
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
Maybe
<
V
>
;
orElse
(
maybe
:
Maybe
<
T
>
)
:
Maybe
<
T
>
;
orElseRun
(
fn
:
(
(
)
=>
void
)
)
:
void
;
orJust
(
val
:
T
)
:
T
;
orLazy
(
fn
:
(
(
)
=>
undefined
|
null
|
T
)
)
:
T
;
orNoneIf
(
val
:
boolean
)
:
Maybe
<
T
>
;
orNothingIf
(
val
:
boolean
)
:
Maybe
<
T
>
;
orNull
(
)
:
null
|
T
;
orSome
(
val
:
T
)
:
T
;
orUndefined
(
)
:
undefined
|
T
;
some
(
)
:
T
;
takeLeft
(
m
:
Maybe
<
T
>
)
:
Maybe
<
T
>
;
takeRight
(
m
:
Maybe
<
T
>
)
:
Maybe
<
T
>
;
to
<
I
extends
Iterable
<
T
>
>
(
ctor
:
(
(
iter
:
Iterable
<
T
>
)
=>
I
)
)
:
I
;
toArray
(
)
:
T
[]
;
toEither
<
E
>
(
left
?:
E
)
:
Either
<
E
,
T
>
;
toList
(
)
:
List
<
T
>
;
toSet
(
)
:
Set
<
T
>
;
toValidation
<
E
>
(
fail
?:
E
)
:
Validation
<
E
,
T
>
;
}
Type Parameters
T
extends
NonNullable
<
{}
>
Hierarchy-Diagram
Legend
interface
public method
Hierarchy (
view full
)
Setoid
<
Maybe
<
T
>
>
ITraversable
<
T
>
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
:
Maybe
<
(
(
val
:
T
)
=>
V
)
>
)
:
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
maybeFn
:
Maybe
<
(
(
val
:
T
)
=>
V
)
>
Returns
Maybe
<
V
>
ap
To
ap
To
<
V
extends
{}
>
(
value
:
Maybe
<
V
>
)
:
T
extends
(
(
arg
:
V
)
=>
any
)
?
Maybe
<
ReturnType
<
T
<
T
>
>
>
:
never
Type Parameters
V
extends
{}
Parameters
value
:
Maybe
<
V
>
Returns
T
extends
(
(
arg
:
V
)
=>
any
)
?
Maybe
<
ReturnType
<
T
<
T
>
>
>
:
never
bind
bind
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
)
:
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
(
val
:
T
)
:
Maybe
<
V
>
Parameters
val
:
T
Returns
Maybe
<
V
>
Returns
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
:
(
(
)
=>
Maybe
<
T
>
)
)
:
Maybe
<
T
>
Parameters
fn
:
(
(
)
=>
Maybe
<
T
>
)
(
)
:
Maybe
<
T
>
Returns
Maybe
<
T
>
Returns
Maybe
<
T
>
chain
chain
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
)
:
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
(
val
:
T
)
:
Maybe
<
V
>
Parameters
val
:
T
Returns
Maybe
<
V
>
Returns
Maybe
<
V
>
contains
contains
(
val
:
T
)
:
boolean
Parameters
val
:
T
Returns
boolean
equals
equals
(
other
:
Maybe
<
T
>
)
:
boolean
Parameters
other
:
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
:
Maybe
<
T
>
)
:
boolean
Parameters
other
:
Maybe
<
T
>
Returns
boolean
filter
filter
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
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
Maybe
<
U
>
filter
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
Maybe
<
T
>
Parameters
fn
:
(
(
val
:
T
)
=>
boolean
)
(
val
:
T
)
:
boolean
Parameters
val
:
T
Returns
boolean
Returns
Maybe
<
T
>
filter
Not
filter
Not
<
U
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
val
is
U
)
)
:
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
Maybe
<
Exclude
<
T
,
U
>
>
filter
Not
(
fn
:
(
(
val
:
T
)
=>
boolean
)
)
:
Maybe
<
T
>
Parameters
fn
:
(
(
val
:
T
)
=>
boolean
)
(
val
:
T
)
:
boolean
Parameters
val
:
T
Returns
boolean
Returns
Maybe
<
T
>
flat
Map
flat
Map
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
)
:
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
Maybe
<
V
>
)
(
val
:
T
)
:
Maybe
<
V
>
Parameters
val
:
T
Returns
Maybe
<
V
>
Returns
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
Maybe
<
V
>
?
V
:
never
Type Parameters
V
Returns
T
extends
Maybe
<
V
>
?
V
:
never
just
just
(
)
:
T
Returns
T
map
map
<
V
extends
{}
>
(
fn
:
(
(
val
:
T
)
=>
V
)
)
:
Maybe
<
V
>
Type Parameters
V
extends
{}
Parameters
fn
:
(
(
val
:
T
)
=>
V
)
(
val
:
T
)
:
V
Parameters
val
:
T
Returns
V
Returns
Maybe
<
V
>
or
Else
or
Else
(
maybe
:
Maybe
<
T
>
)
:
Maybe
<
T
>
Parameters
maybe
:
Maybe
<
T
>
Returns
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
)
:
Maybe
<
T
>
Parameters
val
:
boolean
Returns
Maybe
<
T
>
or
Nothing
If
or
Nothing
If
(
val
:
boolean
)
:
Maybe
<
T
>
Parameters
val
:
boolean
Returns
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
:
Maybe
<
T
>
)
:
Maybe
<
T
>
Parameters
m
:
Maybe
<
T
>
Returns
Maybe
<
T
>
take
Right
take
Right
(
m
:
Maybe
<
T
>
)
:
Maybe
<
T
>
Parameters
m
:
Maybe
<
T
>
Returns
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
)
:
Either
<
E
,
T
>
Type Parameters
E
Parameters
Optional
left
:
E
Returns
Either
<
E
,
T
>
to
List
to
List
(
)
:
List
<
T
>
Returns
List
<
T
>
to
Set
to
Set
(
)
:
Set
<
T
>
Returns
Set
<
T
>
to
Validation
to
Validation
<
E
>
(
fail
?:
E
)
:
Validation
<
E
,
T
>
Type Parameters
E
Parameters
Optional
fail
:
E
Returns
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