Skip to content

IListTuple3UnzipOps<A, B, C>

extensionIListTuple3UnzipOps<A, B, C>onIList<Record>

Unzip operations for IList of 3-tuples.

Methods

unzip() extension

Recordunzip()

Returns 3 new lists as a tuple. The first list is all the first items from each tuple element of this list. The second list is all the second items from each tuple element of this list. The third list is all the third items from each tuple element of this list.

Available on IList<A>, provided by the IListTuple3UnzipOps<A, B, C> extension

Implementation
dart
(IList<A>, IList<B>, IList<C>) unzip() => foldLeft(
  (nil<A>(), nil<B>(), nil<C>()),
  (acc, abc) => (acc.$1.appended(abc.$1), acc.$2.appended(abc.$2), acc.$3.appended(abc.$3)),
);