Package-level declarations

Types

Link copied to clipboard
class KCircularBuffer<T>(val capacity: Int, initialItems: List<T> = emptyList())

A fixed-capacity ring buffer (Circular Buffer).

Link copied to clipboard
class KInterval(scope: CoroutineScope, val period: Duration?, block: suspend () -> Unit)

A repeating interval that invokes block every period.

Link copied to clipboard
class KMap<K, V>(initialEntries: List<Pair<K, V>> = emptyList())

A reactive key-value map.

Link copied to clipboard
class KQueue<T>(initialItems: List<T> = emptyList())

A reactive FIFO queue.

Link copied to clipboard
class KStack<T>(initialItems: List<T> = emptyList())

A reactive LIFO stack.

Link copied to clipboard
class KStateWithHistory<T>(defaultValue: T, capacity: Int = 10)

Holds a value and a capped history of past values, supporting undo/redo.

Link copied to clipboard
class KTimer(scope: CoroutineScope, val delay: Duration?, block: suspend () -> Unit)

A cancellable one-shot timer that fires block after delay.

Functions

Link copied to clipboard
fun interval(scope: CoroutineScope, period: Duration, block: suspend () -> Unit): KInterval

Creates a KInterval that fires block every period.

Link copied to clipboard
fun timer(scope: CoroutineScope, delay: Duration, block: suspend () -> Unit): KTimer

Creates a KTimer that fires block after delay.