Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun merge (list1 list2)
- (if list1
- (if list2
- (if (<=(car list1)(car list2))
- (cons
- (car list1)
- (cons
- (car list2)
- (merge (cdr list1)(cdr list2))
- )
- )
- (cons
- (car list2)
- (cons
- (car list1)
- (merge (cdr list1)(cdr list2))
- )
- )
- )
- list1
- )
- list2
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement