mapIndexed

inline fun <T : Any, R : Any> Buffer<T>.mapIndexed(bufferFactory: BufferFactory<R> = Buffer.Companion::auto, crossinline block: (index: Int, T) -> R): Buffer<R>

Create a new buffer from this one with the given indexed mapping function. Provided BufferFactory is used to construct the new buffer.

Sources

Link copied to clipboard