"sam" <was...@sigmaweb.net> writes: > If would please tell me what you think about the following problem:
Sure! Glad to.
> Problem: > The primitive REVERSE copies the top-level of the list given as its > argument. Write OUR-REVERSE, a procedure that reverses a list without > copying ?
What do I think about the problem? I think it's a homework problem for a class. Not only that, but I think it's not going to teach you anything if you get someone else to do it
And by the way, though you didn't ask, here's a piece of "extra credit" advice to ponder:
I personally think it's a BAD idea for students to send mail to newsgroups asking to have their homework done. You may or may not be aware of the fact that sites like http://www.dejanews.com/ archive all newsgroup traffic and burn it into cdrom for sale to various places. This is the modern equivalent of etching everything you say into stone so that it will be accessible to all future ages. Why should you or anyone care? Well, this means that years or even decades from now, anything you or anyone says on any newsgroup becomes part of the permanent record that can be inspected by potential employer to see what that person's interests, biases, etc. are. And a thing I'd imagine they would want to know about a person but that said person might not want them to know is that the person didn't do his/her own homework... Seems like that could lose a job, or maybe just result in a lower pay offer.
I might be wrong, of course. The question is whether you can afford the risk.
* Stig Hemmer | Keep the boxes and their car pointers in the same places as the first | diagram and just move the cdr pointers.
in the interest of being the least _directly_ helpful on this homework assignment, isn't he better off keeping the CDRs and swapping the CARs?
| PS: Are they called "first and rest pointers" these days?
never seen these function names used to name "pointers". CAR and CDR are still the low-level implementation details of a CONS, while FIRST and REST refer to a particular view of the CONS, namely when used as a list.
#:Erik -- http://www.naggum.no/spam.html is about my spam protection scheme and how to guarantee that you reach me. in brief: if you reply to a news article of mine, be sure to include an In-Reply-To or References header with the message-ID of that message in it. otherwise, you need to read that page.