Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.43 KB | None | 0 0
  1. (define (free-vars t)
  2.   (define (listadd term lista)
  3.     (if (var? term)
  4.         (append lista (list term))
  5.         (cond [(neg? term)
  6.                (listadd (neg-subf term) lista)]
  7.               [(conj? term)
  8.                (listadd (conj-right term) (listadd (conj-left term) lista))]
  9.               [(disj? term)
  10.                (listadd (disj-right term) (listadd (disj-left term) lista))])))
  11.   (remove-duplicates (listadd t null)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement