Result (Result result) { if (result instanceof Effects effects) { return new Effects(effects.returnValue, StreamEx.of(effects.effects).map(ClassDataIndexer::hash).toSet()); } else if (result instanceof Pending) { return new Pending(ContainerUtil.map(((Pending)result).delta, ClassDataIndexer::hash)); } return result; }