decide

inline fun <reified C : Any> decide(creation: Creation = Creation.NONE, name: String = defaultName(C::class.java), onDeleted: Boolean = false, produces: Set<Class<*>>? = null, noinline decide: DecideScope.(S, C) -> Decision)

Decides commands of type C, named name, with a plain function: the fast path. An onDeleted command is decided on a deleted aggregate too (DecideFunction.onDeleted). With produces, the events it may decide, a decision holding another fails the command (DecideFunction.produces).