Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (wielom e lx)
- (if (not (pair? e)) ; czy wyrazenie e jest wyrazeniem prostym
- (if (number? e)
- #t
- (if (member e lx)
- #t
- #f))
- (if (or (equal? (car e) '+) (equal? (car e) '-) (equal? (car e) '*))
- (and (wielom (cadr e) lx) (wielom (caddr e) lx))
- (if (equal? (car e) '/)
- (and (wielom (cadr e) lx) (nzero (caddr e)))
- (if (equal? (car e) '^)
- (and (wielom (cadr e) lx) (nat (caddr e)))
- #f)))))
Add Comment
Please, Sign In to add comment