Limit the number of elements emitted by an iterator.

ilimit(it, n)

Arguments

it

an iteror os something that converts to an iteror.

n

How many elements to take.

Value

a new iteror wrapping the provided one, which will stop after the specified number of elements.