On this page:
Version: 5.0

15 Finding Mutated Variables

Sam Tobin-Hochstadt <samth@ccs.neu.edu>

 (require unstable/mutated-vars)

This library is unstable; compatibility will not be maintained. See Unstable for more information.

(find-mutated-vars stx)  void?
  stx : syntax?
Traverses stx, which should be module-level-form in the sense of the grammar for fully-expanded forms, and records all of the variables that are mutated.

(is-var-mutated? id)  boolean?
  id : identifier?
Produces #t if id is mutated by an expression previously passed to find-mutated-vars, otherwise produces #f.


  > (find-mutated-vars #'(begin (set! var 'foo) 'bar))
  > (is-var-mutated? #'var)


  > (is-var-mutated? #'other-var)