interspace<R extends T> method
insert value between each element
example
[1,2,3,4,5].interspace(-1) // [1,-1,2,-1,3,-1,4,-1,5]
Implementation
Iterable<T> interspace<R extends T>(R r) => List.generate(
length + length - 1, (i) => i % 2 == 0 ? elementAt(i ~/ 2) : r);