chickadee » srfi-196 » range=?

range=? equal range1 range2 procedure

Returns #t if all the ranges are of the same length and if their corresponding values are the same in the sense of equal, and #f otherwise. The runtime of this procedure is O(s) + O(k), where s is the sum of the total accessing times of the ranges and k is the number of ranges.

Examples:

(range=? = (numeric-range 10 30) (numeric-range 10 30)) ⇒ #t
(range=? = (numeric-range 5 10) (numeric-range 6 11)) ⇒ #f
(range=? eqv? (numeric-range 0 0) (range 0 (lambda (i) i))) ⇒ #t