# NOT RUN {
it <- Iterator({m <- m + n}, list(m = 0, n = 1), m)
other <- clone(it)
yield_next(it)
current(other) == current(it) # false
it2 <- clone(other, n = 5)
yield_next(it2)
it2$initial$n # 5
# }
Run the code above in your browser using DataLab