Range

Range: Range, size, start, end, iterator, all, any, none

struct Range<T>: Copyable

A half-open range from start to end.

Range

Range(T start, T end)

Initializes a range from start to end.

Range(T end)

Initializes a range from 0 to end.

size

T size()

Returns the number of values in the range.

start

T start()

Returns the first value.

end

T end()

Returns the last value, exclusive.

iterator

RangeIterator<T> iterator()

Returns an iterator over the values.

all

bool all(bool(T&) predicate)

Returns true if all values satisfy the predicate.

bool all<U: Copyable>(bool(U) predicate)

Returns true if all values satisfy the predicate.

any

bool any(bool(T&) predicate)

Returns true if any value satisfies the predicate.

bool any<U: Copyable>(bool(U) predicate)

Returns true if any value satisfies the predicate.

none

bool none(bool(T&) predicate)

Returns true if no value satisfies the predicate.

bool none<U: Copyable>(bool(U) predicate)

Returns true if no value satisfies the predicate.