Skip to content

RangeInclusive Reference

A RangeInclusive is a finite stream of numbers that start at the specified number and increment by one until the sepcified end. It inherits from Range.

Creates a RangeInclusive between two numbers, inclusive.

var range = RangeInclusive(0, 10);

start: Number - The number to start the range with (inclusive).

end: Number - The number to end the range with (inclusive).

All methods are inherited from the Range class. See the Range reference for documentation.

var seq = RangeInclusive(0, 5).for_each(print_ln);
// 0
// 1
// 2
// 3
// 4
// 5