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

chunked

fun <T, R> Attribute<Iterable<T>>.chunked(size: Attribute<Int>, transform: (List<T>) -> R): Attribute<List<R>>
fun <T, R> Attribute<Iterable<T>>.chunked(size: Int, transform: (List<T>) -> R): Attribute<List<R>>
fun <T> Attribute<Iterable<T>>.chunked(size: Attribute<Int>): Attribute<List<List<T>>>
fun <T> Attribute<Iterable<T>>.chunked(size: Int): Attribute<List<List<T>>>

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

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

This is simply a convenience function.

See Also

kotlin.collections.chunked


fun <T, R> Attribute<Sequence<T>>.chunked(size: Attribute<Int>, transform: (List<T>) -> R): Attribute<Sequence<R>>
fun <T, R> Attribute<Sequence<T>>.chunked(size: Int, transform: (List<T>) -> R): Attribute<Sequence<R>>
fun <T> Attribute<Sequence<T>>.chunked(size: Attribute<Int>): Attribute<Sequence<List<T>>>
fun <T> Attribute<Sequence<T>>.chunked(size: Int): Attribute<Sequence<List<T>>>

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

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

This is simply a convenience function.

See Also

kotlin.sequences.chunked


fun <R> Attribute<String>.chunked(size: Attribute<Int>, transform: (CharSequence) -> R): Attribute<List<R>>
fun <R> Attribute<String>.chunked(size: Int, transform: (CharSequence) -> R): Attribute<List<R>>
fun Attribute<String>.chunked(size: Attribute<Int>): Attribute<List<String>>
fun Attribute<String>.chunked(size: Int): Attribute<List<String>>

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

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

This is simply a convenience function.

See Also

kotlin.text.chunked