Give the docs some love.
This commit is contained in:
@@ -127,7 +127,7 @@ It is a runtime error if `other` is not a number.
|
||||
|
||||
### **..**(other) operator
|
||||
|
||||
Creates a [Range](core/range.html) representing a consecutive range of numbers
|
||||
Creates a [Range](range.html) representing a consecutive range of numbers
|
||||
from the beginning number to the ending number.
|
||||
|
||||
:::wren
|
||||
@@ -138,7 +138,7 @@ from the beginning number to the ending number.
|
||||
|
||||
### **...**(other) operator
|
||||
|
||||
Creates a [Range](core/range.html) representing a consecutive range of numbers
|
||||
Creates a [Range](range.html) representing a consecutive range of numbers
|
||||
from the beginning number to the ending number not including the ending number.
|
||||
|
||||
:::wren
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
^title Range Class
|
||||
^category core
|
||||
|
||||
**TODO**
|
||||
A range defines a bounded range of values from a starting point to a possibly
|
||||
exclusive endpoint. [Here](../range.html) is a friendly introduction.
|
||||
|
||||
Extends [Sequence](sequence.html).
|
||||
|
||||
@@ -9,24 +10,49 @@ Extends [Sequence](sequence.html).
|
||||
|
||||
### **from**
|
||||
|
||||
**TODO**
|
||||
The starting point of the range. A range may be backwards, so this can be
|
||||
greater than [to].
|
||||
|
||||
:::wren
|
||||
(3..5).min // 3.
|
||||
(4..2).min // 4.
|
||||
|
||||
### **to**
|
||||
|
||||
**TODO**
|
||||
The endpoint of the range. If the range is inclusive, this value is included,
|
||||
otherwise it is not.
|
||||
|
||||
:::wren
|
||||
(3..5).min // 5.
|
||||
(4..2).min // 2.
|
||||
|
||||
### **min**
|
||||
|
||||
**TODO**
|
||||
The minimum bound of the range. Returns either `from`, or `to`, whichever is
|
||||
lower.
|
||||
|
||||
:::wren
|
||||
(3..5).min // 3.
|
||||
(4..2).min // 2.
|
||||
|
||||
### **max**
|
||||
|
||||
**TODO**
|
||||
The maximum bound of the range. Returns either `from`, or `to`, whichever is
|
||||
greater.
|
||||
|
||||
:::wren
|
||||
(3..5).min // 5.
|
||||
(4..2).min // 4.
|
||||
|
||||
### **isInclusive**
|
||||
|
||||
**TODO**
|
||||
Whether or not the range includes `to`. (`from` is always included.)
|
||||
|
||||
:::wren
|
||||
(3..5).isInclusive // true.
|
||||
(3...5).isInclusive // false.
|
||||
|
||||
### **iterate**(iterator), **iteratorValue**(iterator)
|
||||
|
||||
**TODO**
|
||||
Iterates over the range. Starts at `from` and increments by one towards `to`
|
||||
until the endpoint is reached.
|
||||
|
||||
Reference in New Issue
Block a user