JuliaLang/julia — pull request #3121 by GunnarFarneback (2013-05-15 22:10:21+00:00)
Title: Range function revisions

This pull request makes a number of revisions to some of the functions of ranges.

* Extend intersect, findin, contains, issorted, searchsortedfirst, searchsortedlast to handle ranges of step 0. (#3053)
* Restrict intersect and findin in ranges.jl to integer ranges. Floating point ranges will fall back to the array versions of these functions. See https://groups.google.com/forum/#!topic/julia-dev/6Z6qTKTCz30
* Extend intersect to handle descending ranges. Intersect for ranges now maintains order or multiplicity of the first argument in the same way as intersect for arrays.
* Add intersect for two general ranges (previously at least one had to be Range1).
* Add intersect for multiple ranges.
* Many new tests.
* Some minor simplifications of existing code.