multiple-value-setfGBBopen Toolsobject-addressnsorted-insertGoTo Top

nsorted-insert   item list &optional predicate key => result-list[Function]

Purpose
Positionally insert item in list based on predicate and key functions.

Package   :gbbopen-tools

Module   :gbbopen-tools

Arguments and values

item     An object
list     A proper list
predicate     A function designator specifying a function object of two arguments that returns a generalized boolean (default is #'<)
key     A function designator specifying a function object of one argument, or nil (default is nil)
result-list     A proper list

Returns
A list into which item has been inserted.

Description
The supplied list may be modified in constructing the result; however, modification of the supplied list itself is not guaranteed.

Example

  > (nsorted-insert 5 '(2 4 6 8))
  (2 4 5 6 8)
  >


The GBBopen Project


multiple-value-setfGBBopen Toolsobject-addressnsorted-insertGoTo Top