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|))))))
........
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users