|
From: | Jörg F . Wittenberger |
Subject: | Re: [Chicken-users] ANN: eping |
Date: | 24 Aug 2013 11:28:40 +0200 |
On Aug 22 2013, Michele La Monaca wrote:
How can I check if a symbol is bound to a value?
Oleg Kiselyov's receipe might be helpful here: http://okmij.org/ftp/Scheme/macro-symbol-p.txt
I would like to do this: (define host "example.com") (eping host) ; host is evaluated (eping localhost) ; localhost is treated as a symbol with a macro like that: (define-syntax eping (syntax-rules () ((_ h) (if (and (symbol? 'h) (bound? 'h)) (_eping h) (_eping (symbol->string '|h|))))))
........
[Prev in Thread] | Current Thread | [Next in Thread] |