Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (estValide? c a b) (not (or
- (and (eq? (eval c) (eval /)) (= b 0))
- (< ((eval c) a b) 0)
- (not (integer? ((eval c) a b)))
- )
- )
- )
- (define (opere op x y) (cond
- ((null? op) op)
- ((estValide? (eval (car op)) x y) (cons ((eval (car op)) x y) (opere (cdr op) x y)))
- ((estValide? (eval (car op)) y x) (cons ((eval (car op)) y x) (opere (cdr op) y x)))
- (else (opere (cdr op) y x))
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement