Order two numerical lists: Difference between revisions
Content deleted Content added
Line 140: | Line 140: | ||
<lang clojure> |
<lang clojure> |
||
(defn lex? [ |
(defn lex? [[x & xs] [y & ys]] |
||
(cond |
|||
(let [sa (count a) sb (count b)] |
|||
(= x y) (lex xs ys) |
|||
(> (compare x y) 0) false |
|||
:else true)) |
|||
</lang> |
</lang> |
||