Iteration
iterConstructs an iterator over a collection.
iter-next!Advances an iterator.
iter-next-back!Advances the back of a double-ended iterator.
iter-finished?Returns #t if an iterator has no more items to produce.
iter-double-ended?Returns #t if an iterator can be advanced from the back.
Basic Iterators
rnIterates over a numeric range.
rniIterates over an inclusive numeric range.
onceIterates over zero or more arguments.
once-withReturns an iterator which lazily calls a function.
repeatReturns an iterator which infinitely yields its arguments.
repeat-withReturns an iterator which repeatedly calls a function.
chunksIterates over non-overlapping sub-arrays.
chunks-exactIterates over non-overlapping sub-arrays with an exact size.
rchunksIterates over non-overlapping sub-arrays, in reverse order.
rchunks-exactIterates over non-overlapping sub-arrays with an exact size, in reverse order.
windowsIterates over overlapping sub-arrays.
linesIterates over lines in a string.
splitIterates over sub-strings.
keysIterates over the keys of a table.
valuesIterates over the values of a table.
Iterator Adapters
revReverses an iterator.
enumerateCounts an iterator's items as they're yielded.
clonedClones another iterator's items.
deep-clonedRecursively clones another iterator's items.
step-bySkips over another iterator's items by the given interval.
mapCalls a function for each of another iterator's items.
filterDiscards items from another iterator which fail to match a predicate.
zipCombines multiple iterators.
chainSequences multiple iterators, one after another.
flattenFlattens nested structure.
cycleRepeats another iterator indefinitely.
takeLimits another iterator to a fixed number of items.
take-whileLimits another iterator using a predicate.
skipSkips a fixed number of leading items from another iterator.
skip-whileSkips leading items which match a predicate.
Iterator Consumers
countConsumes an iterator, counting its items.
nthReturns an iterator's nth item.
nth-backReturns a double-ended iterator's nth-from-last item.
any?Lazily tests whether any of an iterator's items match a predicate.
all?Lazily tests whether all of an iterator's items match a predicate.
findReturns the first of an iterator's items which match a predicate.
rfindReturns the first of an iterator's items which match a predicate, searching backwards.
foldPasses all of an iterator's items to an accumulator function.
rfoldPasses all of an iterator's items to an accumulator function in reverse order.