onEvent

inline fun <E : EVENT> onEvent(noinline func: S.(E) -> STATE)