1 2 3 4 5
package util fun <T> Iterable<T>.expandWith(t: T): Sequence<T> = this.asSequence() + generateSequence { t }.asSequence()