Deprecate inferring negative ranges on Range.new/2
Module
Range
15 changes across 13 versions
Changes by version
left..right without explicit steps inside patterns and guards is deprecated, write left..right//step instead
Decreasing ranges, such as 10..1 without an explicit step is deprecated, write 10..1//-1 instead
Add Range.split/2
Optimize range membership implementation
Address corner cases in Range.disjoint?/2 implementation
Always show step when range is descending
Still match on old range patterns throughout the stdlib
Add Range.new/3 and Range.size/1
Add Range.disjoint?/2
Deprecate Range.range?/1 in favor of pattern matching on _ .. _
Range.range?/1 now checks the validity of a range.
Restrict ranges to integers to fix diverse bugs of values being included in the range when they should not (false positives)
Range is no longer a record, instead use first .. last if you need pattern matching
Range.Iterator protocol has changed in order to work with the new Enumerable.reduce/3. Please see Range.Iterator docs for more info