Compare two lists of numbers in elisp?

So, I can do this (using cl):

(loop for x in my-list
      for y in my-other-list
      if (> x y) return t
      if (< x y) return nil)

But I really feel that it should be as simple as (list> my-list my-other-list)But I can find absolutely no evidence for the existence of this function by any name. In fact, I can't even find general documentation for comparing lists at all. It makes me feel like I'm missing something.

Am I determining (list>)myself, or have I missed a lot of documentation in my haste and confusion?

And if I need to determine this myself, can you do a better job? I really am not a hacker house.

+3
source share
2 answers

How about this:

(require 'cl)
(every '> my-list my-other-list)
+8
source

The nearest Elisp probably provides version-list-<.

+1
source

All Articles