getValueEither

fun <K : Any, V> Map<K, V>.getValueEither(key: K): Either<NoSuchElementException, V>

Returns the value of mapkey as Either.Right, if it exists, or as Either.Left otherwise.

Receiver

the map on which the key is requested

Return

Either of the request

Parameters

key

requested key to be accessed


fun <V> List<V>.getValueEither(index: Int): Either<NoSuchElementException, V>

Returns the value of listindex as Either.Right, if it exists, or as Either.Left otherwise.

Receiver

the map on which the index is requested

Return

Either of the request

Parameters

index

requested key to be accessed