mapToBuffer

inline fun <T, R> Buffer<T>.mapToBuffer(bufferFactory: BufferFactory<R>, crossinline block: (T) -> R): Buffer<R>(source)

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