[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Beginner Q



I won't point out any pointers since pointers are evil unless cleverly
hidden behind safe abstract datatypes.  I will point out that changing
existing cons cells with set-cdr! instead of creating new ones is almost as
evil as pointers.

Paul

On Sat, Nov 10, 2001 at 03:39:36AM +0800, Lam Kok Keong wrote:
> I'm kind of desperate as well.. been working on this for the past one
> week but can't work out the answer..
> 
> Construct a procedure that take two list p, q and return a list that
> contain reverse order of p and q. But it should not create new cons
> cells.
> e.g. (revert (list 1 2 3) (list 4 5 6)) produce (3 2 1 4 5 6)
> 
> Would be grateful if anyone could point out some pointers or solution.
>