From: Markus B. Kr�ger
Subject: Re: newbie Q: insertion into sorted list
Date: 
Message-ID: <du33dcd3a01.fsf@proto.pvv.ntnu.no>
"James Goodzeit" <········@email.msn.com> writes:

> Is there any Lisp primitives or nifty functions for inserting a key
> to the right place in a sorted list---using something like (sort
> (cons x l)) seems it will be extravagantly wasteful.

You could use

  (setf l (merge 'list l (list x) #'<))

This shouldn't be too wasteful, depending on the implementation of
merge.

-- 
 ,-------------------  Markus Bjartveit Kr�ger  ---------------------.
'                                                                     `
` E-mail: ·······@pvv.org           WWW: http://www.pvv.org/~markusk/ '
 )-------------------------------------------------------------------(