KStack
A reactive LIFO stack.
Pairs naturally with KQueue for producer/consumer patterns.
val stack = KStack<String>()
stack.push("first")
stack.push("second")
println(stack.peek()) // "second"
println(stack.pop()) // "second"
println(stack.size) // 1
stack.state.collect { items -> render(items) }Content copied to clipboard
Parameters
initialItems
Items to pre-populate (index 0 = bottom of stack).