为啥“The Reasoned Schemer”在其函数末尾添加一个“o”?

Posted

技术标签:

【中文标题】为啥“The Reasoned Schemer”在其函数末尾添加一个“o”?【英文标题】:Why does 'The Reasoned Schemer' add an 'o' to the end of its functions?为什么“The Reasoned Schemer”在其函数末尾添加一个“o”? 【发布时间】:2015-09-11 21:24:59 【问题描述】:

在推理方案中,他们将标准 lisp 函数命名为以“o”结尾,例如 consoappendo

我的问题是:为什么“The Reasoned Schemer”会在其函数末尾添加一个“o”?

【问题讨论】:

因为它们不是一回事。您将如何在同一范围内使用consconso?这只是 kanren 的作者决定的“方案”。 它们不是标准的 Lisp 函数,也没有广泛支持上标。 【参考方案1】:

来自http://www.cs.indiana.edu/~eholk/papers/sfp2012.pdf的第2页:

It is conventional in Scheme for the names of predicates to
end with the ‘?’ character. We have therefore chosen to end the
names of miniKanren goals with a superscript o, which is meant
to resemble the top of a ?. The superscript e in conde
stands for
‘every,’ since every conde clause may contribute answers.

【讨论】:

另请注意,添加 o 会使名称发音。 我一直以为是因为minikanren是世界语的方言。它也让 Conso The Magnificent 听起来像个布偶。

以上是关于为啥“The Reasoned Schemer”在其函数末尾添加一个“o”?的主要内容,如果未能解决你的问题,请参考以下文章