Guest User

Untitled

a guest
Jul 15th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # function to merge 2 lists
  2. (define (merge lis1 lis2)
  3. (cond
  4. (( null? lis1) lis2 )
  5. (( null? lis2) lis1 )
  6. ( < (car lis1) (car lis2) )
  7. (cons (car lis1) (merge (cdr lis1) lis2))
  8. ((cons (car lis2) (merge lis1 (cdr lis2))))
  9. )
  10. )
Add Comment
Please, Sign In to add comment