commit 81143e27cba6501945b7126dd2e3b1b9630cadb1 parent b0769c5f1a561868c4d4933bc8e2c6de12a9f189 Author: Stephen Chang <stchang@ccs.neu.edu> Date: Wed, 20 Aug 2014 19:18:30 -0400 stx-utils: add stx-member Diffstat:
| M | stx-utils.rkt | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/stx-utils.rkt b/stx-utils.rkt @@ -9,4 +9,6 @@ (apply append (stx-map syntax->list stxs))) (define (curly-parens? stx) (define paren-prop (syntax-property stx 'paren-shape)) - (and paren-prop (char=? #\{ paren-prop))) -\ No newline at end of file + (and paren-prop (char=? #\{ paren-prop))) +(define (stx-member v stx) + (member v (syntax->list stx) free-identifier=?)) +\ No newline at end of file