ilimit: Create a limited iterator

Description

Create an iterator that wraps a specified iterable a limited number of times.

Usage

1
ilimit(iterable, n)

Arguments

iterable

Iterable to iterate over.

n

Maximum number of values to return.

Examples

1
2
# Limit icount to only return three values
as.list(ilimit(icount(), 3))

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.