Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (print-formula f)
- (cond [(var? f) (display f)]
- [(neg? f) (display "~") (print-formula (neg-subf f))]
- [(conj? f) (display "(") (print-formula (conj-left f)) (display " & ")
- (print-formula (conj-rght f)) (display ")")]
- [(disj? f) (display "(") (print-formula (disj-left f)) (display " | ")
- (print-formula (disj-rght f)) (display ")")]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement