Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; treta
- (defun edinstven (el lista uniq)
- (cond
- ((eq el (car lista)) (edinstven el (cdr lista) (+ uniq 1)))
- ((null lista)
- (cond
- ((> 1 uniq) nil)
- ((= 1 uniq) T)
- ((= 0 uniq) nil)
- )
- )
- (t (edinstven el (cdr lista) uniq))
- )
- )
- (edinstven 'a '(a b c) 0)
- (defun podM (a b)
- (cond
- ((null a) T)
- ((null (edinstven (car a) b 0)) nil)
- (t (podM (cdr a) b))
- )
- )
- (podM '(2 3) '(1 2 4 5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement