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

chunked

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

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

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> Field<Sequence<T>>.chunked(size: Field<Int>, transform: (List<T>) -> R): Field<Sequence<R>>
fun <T, R> Field<Sequence<T>>.chunked(size: Int, transform: (List<T>) -> R): Field<Sequence<R>>
fun <T> Field<Sequence<T>>.chunked(size: Field<Int>): Field<Sequence<List<T>>>
fun <T> Field<Sequence<T>>.chunked(size: Int): Field<Sequence<List<T>>>

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

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> Field<String>.chunked(size: Field<Int>, transform: (CharSequence) -> R): Field<List<R>>
fun <R> Field<String>.chunked(size: Int, transform: (CharSequence) -> R): Field<List<R>>
fun Field<String>.chunked(size: Field<Int>): Field<List<String>>
fun Field<String>.chunked(size: Int): Field<List<String>>

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

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