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

Re: PPC & MCL



>Date: Fri, 23 Dec 1994 08:39:37 -0700
>From: paradigm@sierra.net (Paradigm Publishing Systems, Inc.)
>
>Hello,
>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)

`sort' is destructive. This means that it can alter the arguments
passed to it. This does not mean it is meant to be called for side
effects. You need to do this:

>(setq q (sort q #'<))

BTW: For more a nice discussion of this and a great Lisp text check out 
 On Lisp: Advanced Techniques for Common Lisp, Paul Graham, Prentice Hall