Capsule

fun <T : Any, in A> Capsule(creator: (A) -> T, onCreate: (T) -> Unit = { if (it is Engine<*>) it.master.registerEngine(it) })