[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is this a reasonable thing to do?



(define (merge! q1 q2 a<b?)
    (cond ((null? q1) q2)
          ((null? q2) q1)
          ((a<b? (car q1) (car q2))
           (set (cdr q1) (merge! (cdr q1) q2 a<b?))
           q1)
          (else
           (set (cdr q2) (merge! (cdr q2) q1 a<b?))
           q2)))


/c