[comp.sys.ti.explorer] Substitute for REMOVE

cerys@BBN.COM (Dan Cerys) (12/02/89)

Are you sure that the GCLISP on your PC is really a Common Lisp?  Maybe
it's just an older version.  Seems like a simple bug for the Gold Hill
folks to fix.

Anyways, to get around the problem: shadow LISP:REMOVE for your package(s).
(packages are supported, aren't they).  Add your own REMOVE such that it is
accessible in all packages that care.  This REMOVE can either be a function
that calls LISP:REMOVE in the non-count cases, using your own code when
:count is supplied.  If you are a real speed daemon, make your REMOVE a
macro that simply expands to LISP:REMOVE in the non-:count cases (saving
you an extra function call (as if it really matters at the speed your PC
will be running :-) )).

For the random number generator (and many other generators, and numeric
algorithms), a fantastic reference is Numerical Recipes.  It provides great
explanations and sample code (in Pascal/Fortran) that you can translate to
Lisp.  In fact, I use the shadow trick I mentioned for REMOVE to shadow
RANDOM so that I can plug in (in a portable manner) different random number
generators (for when I want to care about things like being able to reproduce
the same random sequence on different implementations).

Good luck on the PC!  Boy, I envy you! :-)

Dan