如何在通用Lisp中重新实现反引号? [英] how can i reimplement backquote in common lisp?
本文介绍了如何在通用Lisp中重新实现反引号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须重新制作反引号(使用unquote和unquote-splicing),而不使用内置的读取器宏`,@ 预期的行为是:
I have to remake backquote (with unquote and unquote-splicing) without using the builtins reader macros `,@ The behaviour expected is:
> (BACKQUOTE (A B (LIST ‘C ‘D) (COMA (LIST ‘E ‘F)
(COMA-AT (LIST ‘G ‘H)))
(A B (LIST ‘C ‘D) (E F) G H)
我尝试使用宏执行此操作,但结果出乎意料.
I try to do it with a macro but the results are no the expected.
非常感谢!!!!
有什么提示可以做什么?
Any hints of what could be done?
推荐答案
http: //lib.store.yahoo.net/lib/paulgraham/glsbq.lisp 有一个例子
这篇关于如何在通用Lisp中重新实现反引号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文