The Little Schemer 4th Edition: rember function discussion

我的未来我决定 提交于 2019-12-10 15:52:31

问题


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?

Thanks in advance


回答1:


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.



来源:https://stackoverflow.com/questions/12399015/the-little-schemer-4th-edition-rember-function-discussion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!