Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # function to merge 2 lists
- (define (merge lis1 lis2)
- (cond
- (( null? lis1) lis2 )
- (( null? lis2) lis1 )
- ( < (car lis1) (car lis2) )
- (cons (car lis1) (merge (cdr lis1) lis2))
- ((cons (car lis2) (merge lis1 (cdr lis2))))
- )
- )
Add Comment
Please, Sign In to add comment