[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macro for replacing a placeholder in an expression

From: Zelphir Kaltstahl
Subject: Re: Macro for replacing a placeholder in an expression
Date: Sat, 6 Aug 2022 14:28:47 +0000

Hello Linus!

On 8/5/22 11:42, Linus Björnstam wrote:
I wrote this, which does a tree fold over a sexp:

It is unhygienic currently, and I will probably never change because I only use 
it at the repl.

The code is really just a syntax-case version of the fast and efficient flatten 
algorithm, but without flattening.

I might study it later. Thank you for that. I have found a solution to my 
previous problems of expansion order using CK macros described at:

Everything seems to work now, except some cases with vectors, I think only with 
vector syntax #(...). That is what I am still trying to figure out. However, 
the current code is in my repository of Guile examples. I would (perma-)link to 
it, but currently notabug has an issue.

Using CK macros does make the macros simpler, although one must get the quoting 
right, which is sometimes confusing.

Best regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]