iterator_with_state <- bubu <- function() {
i <- 0L
nextEl <- function() (i <<- i + 1L)
currentEl <- function() i
list(
nextElem = nextEl,
currentElem = currentEl
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.