[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PPC & MCL
- To: info-mcl@digitool.com
- Subject: Re: PPC & MCL
- From: converse@cs.uchicago.edu (timoshenko)
- Date: Fri, 23 Dec 1994 18:07:06 GMT
- Organization: Univ. of Chicago Computer Science Dept.
- References: <199412231640.AA27481@diamond.sierra.net>
- Sender: owner-info-mcl@digitool.com
>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
- References:
- PPC & MCL
- From: paradigm@sierra.net (Paradigm Publishing Systems, Inc.)