Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. (define (estValide? c a b) (not (or
  2. (and (eq? (eval c) (eval /)) (= b 0))
  3. (< ((eval c) a b) 0)
  4. (not (integer? ((eval c) a b)))
  5. )
  6. )
  7. )
  8.  
  9. (define (opere op x y) (cond
  10. ((null? op) op)
  11. ((estValide? (eval (car op)) x y) (cons ((eval (car op)) x y) (opere (cdr op) x y)))
  12. ((estValide? (eval (car op)) y x) (cons ((eval (car op)) y x) (opere (cdr op) y x)))
  13. (else (opere (cdr op) y x))
  14. )
  15. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement