Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (del graph peaks) ;test (del '((1 2 ) (3 1) (0 2)) '(1 3 2)) (del '((1 2 ) (3 1) (0 2)) '(1 3))
- (if (empty? peaks) graph
- (del (map (λ(p) (cond
- ( (equal? (car p) (car peaks)) (list (- (car p) 1) (cadr p))) ;кадр-это второй эелемент в списке,а не кдр(кдр-список из последнего элемента)
- ( (equal? (cadr p) (car peaks)) (list (car p)(- (cadr p) 1)))
- (else p))) graph) (cdr peaks))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement