lightning-kmp
/
fr.acinq.lightning.utils
/
Either
common
Either
sealed class
Either
<out
A
, out
B
>
Content copied to clipboard
Types
Functions
Properties
Extensions
Inheritors
Types
Left
Link copied to clipboard
common
data class
Left
<out
A
,
Nothing
>(value:
A
) :
Either
<
A
,
Nothing
>
Content copied to clipboard
Right
Link copied to clipboard
common
data class
Right
<
Nothing
, out
B
>(value:
B
) :
Either
<
Nothing
,
B
>
Content copied to clipboard
Functions
fold
Link copied to clipboard
common
fun <
X
>
fold
(fa: (
A
) ->
X
, fb: (
B
) ->
X
):
X
Content copied to clipboard
transform
Link copied to clipboard
common
fun <
X
,
Y
>
transform
(fa: (
A
) ->
X
, fb: (
B
) ->
Y
):
Either
<
X
,
Y
>
Content copied to clipboard
Properties
isLeft
Link copied to clipboard
common
abstract val
isLeft
:
Boolean
Content copied to clipboard
isRight
Link copied to clipboard
common
abstract val
isRight
:
Boolean
Content copied to clipboard
left
Link copied to clipboard
common
abstract val
left
:
A
?
Content copied to clipboard
right
Link copied to clipboard
common
abstract val
right
:
B
?
Content copied to clipboard
Inheritors
Either
Link copied to clipboard
Either
Link copied to clipboard
Extensions
flat
Map
Link copied to clipboard
common
fun <
L
,
R
,
T
>
Either
<
L
,
R
>.
flatMap
(f: (
R
) ->
Either
<
L
,
T
>):
Either
<
L
,
T
>
Content copied to clipboard
map
Link copied to clipboard
common
fun <
L
,
R
,
T
>
Either
<
L
,
R
>.
map
(f: (
R
) ->
T
):
Either
<
L
,
T
>
Content copied to clipboard