Increments the Iterator without returning anything. move_more() repeats move_next() a specified number of times. move_while() repeats move_next() until a condition is met. Refer to the number of the current iteration with .iter.

move_next(iter)

move_more(iter, more = 1L)

move_while(iter, cond)

Arguments

iter

An Iterator object object

more

How many times to iterate

cond

A quoted logical expression involving some variable(s) in iter$initial, so that move_next() continues being called while the expression returns TRUE

Examples

primes <- 2:10000 %>% that_for_all(range(2, .x)) %>% we_have(~.x %% .y != 0, "Iterator") current(primes)
#> [1] NA
move_more(primes, 100) current(primes)
#> [1] 541