separateEither

Separate the inner Either values into the Either.Left and Either.Right.

Receiver

Iterable of Validated

Return

a tuple containing List with Either.Left and another List with its Either.Right values.


Separate the inner Either values into the Either.Left and Either.Right.

Receiver

Iterable of Validated

Return

a tuple containing Sequence with Either.Left and another Sequence with its Either.Right values.


Deprecated

This API is niche and will be removed in the future. If this method is crucial for you, please let us know on the Arrow Github. Thanks! https://github.com/arrow-kt/arrow/issues Prefer using the Option DSL, or explicit fold or when

Replace with

import arrow.core.None
import arrow.core.Some
import arrow.core.Option
fold({ None to None }) { either -> either.fold<Pair<Option<A>, Option<B>>>({ Some(it) to None }, { None to Some(it) }) }

Separate the inner Either value into the Either.Left and Either.Right.

Receiver

Option of Either

Return

a tuple containing Option of Either.Left and another Option of its Either.Right value.