For loop utilities

September 8, 2024 ยท View on GitHub

Source: include/stdlib/builtin/for.ml

Provides convenient for-based constructs and looping utilities.

Types

TypesDescription
rangeType to hold range-based looping information.
file_rangeType to hold file-based looping information.
c_str_rangeType to hold string-based looping information.

Functions

Note

iter/start/stop/next methods are not discussed in this document. Check the standard library examples for usage examples.

FunctionsDescription
rangeCreates an iterator to a sequence of numbers based on the start and stop (optional) values.
linesCreates an iterator to a sequence of lines from the given file.