byte vec & bit vec (bit set)
This commit is contained in:
10
src/main/kotlin/blitz/collections/IterUtils.kt
Normal file
10
src/main/kotlin/blitz/collections/IterUtils.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
package blitz.collections
|
||||
|
||||
fun <T, R> Iterator<T>.mapModifier(fn: (T) -> R): Iterator<R> =
|
||||
object : Iterator<R> {
|
||||
override fun next(): R =
|
||||
fn(this@mapModifier.next())
|
||||
|
||||
override fun hasNext(): Boolean =
|
||||
this@mapModifier.hasNext()
|
||||
}
|
Reference in New Issue
Block a user