toList method

List<R> toList()

Converts this Either to a list, containing the right value or empty for Left

Implementation

List<R> toList() => isRight ? [(this as Right<L, R>).value] : [];