free-vars   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/pattern.xtm

Implementation

;; find free (undefined) variables in expr
(define free-vars
  (lambda (expr . args)
    (cond ((symbol? expr) (if (defined? expr) '() expr))
          ((atom? expr) '())
          ((list? expr) (flatten (map free-vars expr)))
          (else (error)))))


Back to Index