context('reset')
test_that('Reset returns state to start', {
counter <- generator(0, ~ state + 1)
discard <- take(counter, 5)
reset(counter)
expect_equal(get_state(counter), get_start(counter))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.