All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gorttar.data.SequenceEquality.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package org.gorttar.data

infix fun Sequence<*>.eq(ySequence: Sequence<*>): Boolean {
    val xs = iterator()
    val ys = ySequence.iterator()
    while (xs.hasNext() || ys.hasNext()) if (!xs.hasNext() || !ys.hasNext() || xs.next() != ys.next()) return false
    return true
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy