Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (18 sloc) 632 Bytes
package io.dotanuki.norris.architecture
sealed class StateTransition<out T> {
interface Parameters
class Unparametrized<T> internal constructor(
val task: suspend () -> T
) : StateTransition<T>()
class Parametrized<T> internal constructor(
val task: suspend (Parameters) -> T,
val parameters: Parameters
) : StateTransition<T>()
companion object {
operator fun <T> invoke(task: suspend () -> T) = Unparametrized(task)
operator fun <T> invoke(
task: suspend (Parameters) -> T,
data: Parameters
) = Parametrized(task, data)
You can’t perform that action at this time.