cloneRecursively

fun cloneRecursively(currentStates: MutableSet<State> = mutableSetOf()): MutableSet<State>