# NOT RUN {
# create an iterator that returns three random numbers
it <- irnorm(1, count=3)
nextElem(it)
nextElem(it)
nextElem(it)
try(nextElem(it)) # expect a StopIteration exception
# }
Run the code above in your browser using DataLab