Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
NEED HELP PLEASE
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sam  
View profile  
 More options Jun 27 1998, 3:00 am
Newsgroups: comp.lang.lisp
From: "sam" <was...@sigmaweb.net>
Date: 1998/06/27
Subject: NEED HELP PLEASE

If would please tell me what you think about the following problem:

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 ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kent M Pitman  
View profile  
 More options Jun 27 1998, 3:00 am
Newsgroups: comp.lang.lisp
From: Kent M Pitman <pit...@world.std.com>
Date: 1998/06/27
Subject: Re: NEED HELP PLEASE

"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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stig Hemmer  
View profile  
 More options Jun 28 1998, 3:00 am
Newsgroups: comp.lang.lisp
From: Stig Hemmer <s...@pvv.ntnu.no>
Date: 1998/06/28
Subject: Re: NEED HELP PLEASE

"sam" <was...@sigmaweb.net> writes:
> 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 ?

Draw a box diagram with car and cdr pointers for a three-element list.

Draw the corresponding diagram for the reversed list.  Keep the boxes
and their car pointers in the same places as the first diagram and
just move the cdr pointers.

Look at the two diagrams and see what needs to be done to get from one
to the other.

Write your function doing this.

Stig Hemmer.

PS: Are they called "first and rest pointers" these days?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Jun 28 1998, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <cle...@naggum.no>
Date: 1998/06/28
Subject: Re: NEED HELP PLEASE

* 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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott L. Burson  
View profile  
 More options Jun 28 1998, 3:00 am
Newsgroups: comp.lang.lisp
From: "Scott L. Burson" <Gy...@zeta-sqoft.com>
Date: 1998/06/28
Subject: Re: NEED HELP PLEASE

Erik Naggum wrote:

> * 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?

No.  NREVERSE swaps the cdrs, and for good reason, as you'll see if you try
writing it both ways.

-- Scott

                                  * * * * *

To use the email address, remove all occurrences of the letter "q".


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »