create_sequence: creates a lazy sequence

Description Usage Arguments Value Examples

Description

Create an (infinite) sequence

Usage

1
create_sequence(head_value, generator)

Arguments

head_value

the value of the first element

generator

a function that takes the current head and produces a new item

Value

A lazy sequence of items

Examples

1
natural_numbers <- create_sequence(0, function(x) x + 1)

dirkschumacher/transduceR documentation built on May 15, 2019, 8:50 a.m.