riffleOutList<T> function

List<T> riffleOutList<T>(
  1. Iterable<T> it
)

Split in half, interleave together.

Implementation

List<T> riffleOutList<T>(Iterable<T> it) {
  if (it.isEmpty) {
    return [];
  }
  return interleaveList(it.toList().sublist(0, (it.length / 2).round()),
      it.toList().sublist((it.length / 2).round()));
}