Order two numerical lists: Difference between revisions

Added Racket code
(Added BBC BASIC)
(Added Racket code)
Line 807:
<lang python>>>> [1,2,1,3,2] < [1,2,0,4,4,0,0,0]
False</lang>
 
=={{header|Racket}}==
<lang Racket>#lang racket
 
(define (lex<? a b)
(cond ((null? b) #f)
((null? a) #t)
((= (car a) (car b)) (lex<? (cdr a) (cdr b)))
(else (< (car a) (car b)))))
 
(lex<? '(1 2 3 4 5) '(1 2 3 4 4)) ; -> #f
</lang>
 
=={{header|Rascal}}==
Anonymous user