Skip to content

Commit 8a2658b

Browse files
Add aliases to Iterable.with(Iterable)
1 parent dfa321e commit 8a2658b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/main/kotlin/KotlinFunctionLibrary.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,13 @@ println(x in z) //prints true
11761176
ZippingIterable(this.iterator(), other.iterator())
11771177
fun <A, B> Iterable<A>.with(other: Iterable<B>, offset: Int, applyOffsetToFirstIterable: Boolean = true, applyOffsetToSecondIterable: Boolean = true): ZippingIterableWithOffset<A, B> =
11781178
ZippingIterableWithOffset(this.iterator(), other.iterator(), offset, applyOffsetToFirstIterable, applyOffsetToSecondIterable)
1179-
1179+
1180+
fun <A, B> Iterable<A>.zipLazy(other: Iterable<B>): ZippingIterable<A, B> = this.with(other)
1181+
fun <A, B> Iterable<A>.zipLazy(other: Iterable<B>, offset: Int, applyOffsetToFirstIterable: Boolean = true, applyOffsetToSecondIterable: Boolean = true): ZippingIterableWithOffset<A, B> = this.with(other, offset, applyOffsetToFirstIterable, applyOffsetToSecondIterable)
1182+
1183+
fun <A, B> Iterable<A>.zipWithLazy(other: Iterable<B>): ZippingIterable<A, B> = this.with(other)
1184+
fun <A, B> Iterable<A>.zipWithLazy(other: Iterable<B>, offset: Int, applyOffsetToFirstIterable: Boolean = true, applyOffsetToSecondIterable: Boolean = true): ZippingIterableWithOffset<A, B> = this.with(other, offset, applyOffsetToFirstIterable, applyOffsetToSecondIterable)
1185+
11801186
@JvmStatic
11811187
fun main(args: Array<String>) {
11821188
println("KotlinFunctionLibrary v4.0.0")

0 commit comments

Comments
 (0)