Advertisement
Guest User

Untitled

a guest
Jan 11th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. (defun izbrisiPrv(lista)
  2. (cdr lista)
  3. )
  4.  
  5.  
  6. (defun podlista(l)
  7. (cond
  8. ((null l) nil)
  9. ((listp (car l)) (cons (izbrisiPrv(car l)) (cdr l)))
  10. ((atom (car l)) (podlista(cdr l)))
  11. (t (cons (podlista(car l)) (podlista(cdr l))))
  12. )
  13. )
  14.  
  15.  
  16. (print (podlista '(1 (2 (3 4) 5) 6)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement