peek: Safely check for next value in iterator

Description Usage Arguments Examples

View source: R/peek.R

Description

Safely check for next value in iterator

Usage

1
peek(.generator)

Arguments

.generator

A function with the class generator

Examples

1
2
3
counter <- generator(0, ~ state + 1)
peek(counter)
counter()

michaelquinn32/generators documentation built on May 22, 2019, 9:52 p.m.