Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (Sol4 matrix)
- (define (creating k vn matr rez)
- (if (empty? matr) rez
- (if (empty? (car matr)) (creating (add1 k) 0 (cdr matr) rez)
- (if (= (length (car matr)) 1) (creating (add1 k) 0 (cdr matr) (if (= (caar matr) 1) (cons (cons k vn) rez) rez))
- (creating k (add1 vn) (my-cdar matr) (if (= (caar matr) 1) (cons (cons k vn) rez) rez)) ))))
- (creating 0 0 matrix (if (= (car (reverse (car (reverse matrix)))) 1) (cons (cons (- (length matrix) 1)(- (length matrix) 1)) '()) '())))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement