On Fri, Jul 30, 2021 at 2:11 PM Elijah Stone <[email protected]> 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!
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to