On Thu, Aug 22, 2013 at 10:15 PM, Michele La Monaca <mikele.chic...@lamonaca.net> wrote: > On Thu, Aug 22, 2013 at 6:39 PM, John Cowan <co...@mercury.ccil.org> wrote: >> Michele La Monaca scripsit: > > (define-syntax bound? > (syntax-rules () > ((_ exp) (handle-exceptions exn #f (atom? exp) #t))))
The macro above has an useless atom? call and side-effects (exp is evaluated no matter what). Hopefully my next attempt is the last one: (define-syntax bound? (syntax-rules () ((_ exp) (handle-exceptions exn #f (if (symbol? 'exp) exp #t) #t)))) This macro try to evaluate exp only if it is a symbol and that kind of "evaluation" has no side effects. Right? _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users