在 LISP 中,“let”和“let”有什么区别?和“与”?
一个简单的例子来展示行动上的差异确实会有帮助,因为对我来说,它们看起来都是可以互换的?谢谢 :)
A simple example to show the differences in action would really help, since to me they both just seem interchangeable? Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
至少在 Common Lisp 中,您只能在
loop
宏的上下文中使用with
。请参阅 Common Lisp Hyperspec。In Common Lisp, at least, you can only use
with
in the context of aloop
macro. See the Common Lisp Hyperspec.它们在功能上确实是等效的。
事实上,至少 SBCL 将
loop
宏调用中with
的任何使用扩展为封闭的LET
形式。运行以下命令:
产生以下扩展:
They are indeed functionally equivalent.
In fact, at least SBCL expands any use of
with
in aloop
macro invocation into an enclosingLET
form.Running the following:
Results in the following expansion: