On Wednesday, 28. July 2010 05:12:52 Michael Zedeler wrote: > Writing ($a .. $b).reverse doesn't make any sense if the result were a > new Range, since Ranges should then only be used for inclusion tests (so > swapping endpoints doesn't have any meaningful interpretation), but > applying .reverse could result in a coercion to Sequence.
Swapping the endpoints could mean swapping inside test to outside test. The only thing that is needed is to swap from && to ||: $a .. $b # means $a <= $_ && $_ <= $b if $a < $b $b .. $a # means $b <= $_ || $_ <= $a if $a < $b Regards TSa. -- "The unavoidable price of reliability is simplicity" -- C.A.R. Hoare "Simplicity does not precede complexity, but follows it." -- A.J. Perlis 1 + 2 + 3 + 4 + ... = -1/12 -- Srinivasa Ramanujan