开发者

Return a quasiquote with no beginning parenthesis in Scheme?

开发者 https://www.devze.com 2023-02-12 07:19 出处:网络
Is there a way to return an expression using quasiquotes while still getting rid of the beginning parenthesis?

Is there a way to return an expression using quasiquotes while still getting rid of the beginning parenthesis?

For example:

`(a ,(foo))

could return actually return

`a *foosvalue)

I realize this seems kind of random. I'm trying to write a func开发者_如何学Pythontion in scheme that returns an expression that can then be evaluated using eval. Is there a better way for returning just expressions?


Quasiquoting can only return valid S-expressions. You can return something like a symbol, but not part of a list. You can splice multiple elements from a list into a quasiquoted region using ,@, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消