Generators are functions that contain a mutable internal state. Calls of the function modify that state, making the function iterable: repeated calls of the function return different values. When used correctly, generators offer an efficient solution to many computational problems. This package provides a grammar for working with these tools.
This package was inspired by Reginald Braithwaite's book on Javascript Javascript Allonge and Jeff Knupp's blog post on using generators in Python. It also borrows heavily from Rust's iterators methods, which inspired the framework of iterator adaptors and consumers.
Generators behave much like iterators, which are objects with a mutable internal state. There are multiple implementations of iterators in R. See below.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.