kbox / ch.tutteli.kbox

Package ch.tutteli.kbox

Types

PeekingIterator

class PeekingIterator<out T> : Iterator<T>

WithIndex

data class WithIndex<out T>

A named pair with index and value.

Extensions for External Classes

kotlin.Array

kotlin.collections.Iterable

kotlin.collections.Iterator

kotlin.collections.List

kotlin.collections.Map

kotlin.sequences.Sequence

Functions

forThisAndForEachIn

fun <E> E.forThisAndForEachIn(iterable: Iterable<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in iterable.

fun <E> E.forThisAndForEachIn(sequence: Sequence<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in sequence.

glue

infix fun <T> T.glue(otherArgs: Array<out T>): List<T>

Delegates to varargToList -- adds this and the otherArgs into a new List and returns it.

varargToList

fun <T> varargToList(arg: T, otherArgs: Array<out T>): List<T>

Adds the given arg and the otherArgs into a new List and returns it.