Newsgroups: comp.lang.lisp.mcl
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!uchinews.uchicago.edu!converse
From: converse@cs.uchicago.edu (timoshenko)
Subject: Re: PPC & MCL
In-Reply-To: paradigm@sierra.net's message of 23 Dec 1994 12:01:31 -0500
Message-ID: <CONVERSE.94Dec23120706@sloth.uchicago.edu>
Sender: news@uchinews.uchicago.edu (News System)
Organization: Univ. of Chicago Computer Science Dept.
References: <199412231640.AA27481@diamond.sierra.net>
Date: Fri, 23 Dec 1994 18:07:06 GMT
Lines: 32

>I'm running MCL 2.0.1 (patches obtained from cambridge.apple.com). Does
>this version run error free on the PPC or are there other patches required?
>In the version I'm running there seems to be an error with -sort-
	   >(setf q '(4 3 5 1 6))
		   (4 3 5 1 6)
	   >(sort q #'<)
		   (1 2 3 4 5 6)
	   >q
		   (5 6)

No, this is the way it's supposed to work --- SORT destructively
modifies its argument, and it is used for its result.  If you want
q to be bound to the sorted list, you need to do something like:
     (setf q (sort q #'<))

Notice that since SORT is a function not a macro, it would be
difficult for it to have the effect you were expecting.  q gets
evaluated before SORT even "sees it", and so the function is
applied to the list that q was bound to, not the symbol q
itself.


	--tim






--
-------------------------------------------------------------------------------
Tim Converse  U. of Chicago CS Dept.  converse@cs.uchicago.edu  (312) 702-8584
