[CM] value of 'define'
Gregg Reynolds
dev at mobileink.com
Fri Jul 30 12:48:49 PDT 2021
On Fri, Jul 30, 2021 at 2:11 PM Elijah Stone <elronnd at elronnd.net> wrote:
> On Fri, 30 Jul 2021, Gregg Reynolds wrote:
>
> > It looks like s7 define returns the value defined:
>
> > Is there any way to turn that off? I can tell my _to_string function
> > not to print the ast, but I still want this to print the ast:
>
> (define define
> (let ((o-define define))
> (macro (k v)
> `(begin
> (,o-define ,k ,v)
> ',k))))
Ha-ha, I forgot that everything in Scheme is negotiable. Even more so in
s7:
char *def = "(define define "
"(let ((o-define define)) "
"(macro (k v) "
"`(begin "
"(,o-define ,k ,v) "
"',k)))) ";
void sunlark_redefine_define(s7_scheme *s7)
{
s7_pointer path = s7_eval_c_string(s7, def);
}
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210730/78c6fcbb/attachment.html>
More information about the Cmdist
mailing list