makeEven<A, B> function

Tuple2<List<A>, List<B>> makeEven<A, B>(
  1. List<A> listA,
  2. List<B> listB
)

Implementation

Tuple2<List<A>, List<B>> makeEven<A, B>(List<A> listA, List<B> listB) {
  var length = max(listA.length, listB.length);

  return Tuple2(
      [for (var n in range(end: length)) listA[(n * listA.length) ~/ length]],
      [for (var n in range(end: length)) listB[(n * listB.length) ~/ length]]);
}