core :: Iterator :: alternate
e
assert [1,2,3].iterator.alternate(0).to_a == [1,0,2,0,3]
# Alternate each item with `e`. # # assert [1,2,3].iterator.alternate(0).to_a == [1,0,2,0,3] fun alternate(e: E): Iterator[E] do return new PipeAlternate[E](self, e) end