Function: nnvirtual-merge-sorted-lists

nnvirtual-merge-sorted-lists is a byte-compiled function defined in nnvirtual.el.gz.

Signature

(nnvirtual-merge-sorted-lists &rest LISTS)

Documentation

Merge many sorted lists of numbers.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnvirtual.el.gz
;; This is currently O(kn^2) to merge n lists of length k.
;; You could do it in O(knlogn), but we have a small n, and the
;; overhead of the other approach is probably greater.
(defun nnvirtual-merge-sorted-lists (&rest lists)
  "Merge many sorted lists of numbers."
  (if (null (cdr lists))
      (car lists)
    (sort (apply #'nconc lists) #'<)))