arrow-core-data / arrow.core / kotlin.collections.Iterable / interleave
fun <A>
Iterable
<A>.interleave(other:
Iterable
<A>):
List
<A>
interleave both computations in a fair way.
import arrow.core.*
fun main(args: Array<String>) {
//sampleStart
val tags = List(10) { "#" }
val result =
tags.interleave(listOf("A", "B", "C"))
//sampleEnd
println(result)
}
Do you like Arrow?
✖