Kotlin HashSet chunked()
Syntax & Examples
Syntax of HashSet.chunked()
There are 2 variations for the syntax of HashSet.chunked() extension function. They are:
1.
fun <T> Iterable<T>.chunked(size: Int): List<List<T>>
This extension function splits this collection into a list of lists each not exceeding the given size.
2.
fun <T, R> Iterable<T>.chunked( size: Int, transform: (List<T>) -> R ): List<R>
This extension function splits this collection into several lists each not exceeding the given size and applies the given transform function to an each.