Closed gwadej closed 9 years ago
Q: I assume [5..1] is an error because the 'step' must be 1 and there is no way to get there.
A: The RFC says: "If the end of the range is < the start of the range (with positive step value), then the range is empty (consistent with Haskell)." So [5..1] == [].
Q: What happens with [2,4...9]? If 'end' is not part of the sequence, would it be included? I assume not, but it should probably be specified.
A: The result is the same sequence as [2:2:9]. You get [2,4,6,8]. In other words, no change from current semantics.
Updated Sequences.md to make this all clearer.
Looks great.
In the section Ranges, I have some questions about the new range syntax.