Little Schemer第4版:rember函数讨论 [英] The Little Schemer 4th Edition: rember function discussion
问题描述
在简化了rember
函数后的第41页上,有一个问题回答我不太了解.
On page 41 after simplification of the rember
function, there is a question-respond that I don't understand very well.
Q: So why don't we simplify right away?
R: Because then a function's structure does not coincide with its argument's structure.
我已经尝试了几天,但我不明白回答这个问题的确切含义.
I have tried to figure it out for a couple of days, but I don't understand what exactly means that question-respond.
有人能解释我弗里德曼想回答的问题吗?
Could anyone explain me what Friedman want to show with that question-respond?
预先感谢
推荐答案
直到本章这一点为止,列表的递归都是使用带有两个条件的cond
编写的,其中第二个条件又是另一个cond
)不一致的意思-因为现在函数被构造为具有三个条件的单个cond
,更简单而且更容易理解.
Up until this point in the chapter, recursions on lists had been written using a cond
with two conditions, where the second condition was in turn another cond
. That's what the author meant with "the argument structure" (a list) not coinciding with "the function structure" (a two-condition cond
) - because now the function is structured as a single cond
with three conditions, simpler and easier to understand.
这篇关于Little Schemer第4版:rember函数讨论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!