partitionEithers method

List<List> partitionEithers()

Partition into 2 Lists, the first containing Left the values and the second containing the Right values.

Implementation

List<List<dynamic>> partitionEithers() => fold(
      [<A>[], <B>[]],
      (r, either) {
        either.visit(
          left: (r.first as List<A>).add,
          right: (r.last as List<B>).add,
        );
        return r;
      },
    );