最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to avoid evaluating one statement excluded by predicate during the conditional like `if` in Scheme? - Stack Overflow

programmeradmin5浏览0评论

Here is the minimal example:

1 ]=> (if #f (quasiquote ((unquote if))) (quasiquote (if)))

;Classifier may not be used as an expression: #[classifier-item 12]
2 error> (quasiquote (if))

;Value: (if)
2 error> (quasiquote ((unquote if)))

;Classifier may not be used as an expression: #[classifier-item 12]
3 error> (if #f 'not-run (quasiquote (if)))

;Value: (if)

Based on the predicate, we should not evaluate (quasiquote ((unquote if))) with the special form if. The problem trivially also holds for syntax derived from if like cond etc.

How to solve with the above problem?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论