ClosedRange

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

struct ClosedRange<T>: Copyable

An inclusive range from start to end.

ClosedRange

ClosedRange(T start, T end)

Initializes a range from start to end.

ClosedRange(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.

iterator

ClosedRangeIterator<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.