Documentation / dataflow-async / com.femastudios.dataflow.async.extensions / foldRightIndexed
Go to reference

foldRightIndexed

fun <T, R> Attribute<List<T>>.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): Attribute<R>
fun <T, R> Attribute<List<T>>.foldRightIndexed(initial: Attribute<R>, operation: (index: Int, T, acc: R) -> R): Attribute<R>

Same as foldRightIndexed, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling foldRightIndexed in the transformation function.

This is simply a convenience function.

See Also

kotlin.collections.foldRightIndexed


fun <R> Attribute<String>.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): Attribute<R>
fun <R> Attribute<String>.foldRightIndexed(initial: Attribute<R>, operation: (index: Int, Char, acc: R) -> R): Attribute<R>

Same as foldRightIndexed, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling foldRightIndexed in the transformation function.

This is simply a convenience function.

See Also

kotlin.text.foldRightIndexed