The Little Schemer 4th Edition: rember function discussion
Asked Answered
F

1

5

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

Filide answered 13/9, 2012 at 3:26 Comment(2)
Programmers Stackexchange would be more appropriate place for this discussion.Roice
Thanks for comment @Roice I put the question here because I saw that StackOverflow already have a the-little-schemer tag.Filide
S
4

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.

Smoking answered 13/9, 2012 at 3:43 Comment(1)
Thanks @Óscar with your answer and this post I understood what Friedman meantFilide

© 2022 - 2024 — McMap. All rights reserved.