fold

inline fun <T : Any, R> Buffer<T>.fold(initial: R, operation: (R, T) -> R): R

Fold given buffer according to operation