commonMain.fr.acinq.lightning.utils.collections.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lightning-kmp-jvm Show documentation
Show all versions of lightning-kmp-jvm Show documentation
A Kotlin Multiplatform implementation of the Lightning Network
package fr.acinq.lightning.utils
fun List.startsWith(prefix: List): Boolean = this.take(prefix.size) == prefix
fun >> Triple, Iterable, Iterable>.zippedTo(destination: C): C {
val i1 = first.iterator()
val i2 = second.iterator()
val i3 = third.iterator()
while (i1.hasNext() && i2.hasNext() && i3.hasNext()) destination.add(Triple(i1.next(), i2.next(), i3.next()))
return destination
}
fun Triple, Iterable, Iterable>.zipped(): List> =
zippedTo(ArrayList())
© 2015 - 2024 Weber Informatics LLC | Privacy Policy