flix

0.75.0

Range

Definitions

def forEach(f: t -> Unit \ ef, r: Range[t]): Unit \ ef with Discrete[t] Source

Applies f to every element of r.

def intersection(r1: Range[t], r2: Range[t]): Range[t] with Order[t] Source

Returns the intersection of the ranges r1 and r2.

The result is empty if r1 and r2 do not overlap.

def isEmpty(r: Range[t]): Bool with Order[t] Source

Returns true if and only if the range r is empty, i.e. it contains no elements.

def iterator(rc: Region[r], rng: Range[t]): Iterator[t, r, r] \ r with Discrete[t] Source

Returns an iterator over the elements of r.

def memberOf(x: t, r: Range[t]): Bool with Order[t] Source

Returns true if and only if x is a member of the range r.

def overlaps(r1: Range[t], r2: Range[t]): Bool with Order[t] Source

Returns true if and only if the ranges r1 and r2 overlap, i.e. they share at least one element.

def toList(r: Range[t]): List[t] with Discrete[t] Source

Returns the elements of r as a list.

def toSet(r: Range[t]): Set[t] with Discrete[t] Source

Returns the elements of r as a set.

def toVector(r: Range[t]): Vector[t] with Discrete[t] Source

Returns the elements of r as a vector.