Common Lisp Package: METABANG.CL-CONTAINERS.TEST

README:

FUNCTION

Private

ENSURE-LIST (X)

If `x` is a list then ensure-list returns it. Otherwise, this returns a singleton list containing `x`.

LENGTH-1-LIST-P (X)

Is x a list of length 1? Note that this is better than the naive (= (length x) 1) because we don't need to traverse the entire list...

SET-EQUAL (LIST1 LIST2 &REST ARGS &KEY TEST KEY)

Returns t if list1 and list2 are equal (as sets). If list1 and list2 are not equal returns (as multiple values) nil and two lists. The first list contains the elements in list1 and not in list2 and the second list contains elements in list2 and not in list1.

Undocumented

MAPARRAY (ARRAY FN)

MACRO

Private

DEFCLASS* (NAME SUPERCLASSES SLOTS &REST CLASS-OPTIONS)

Like 'defclass-brief' but also provides the :MAKE-LOAD-FORM-P, :EXPORT-P, :EXPORT-SLOTS, :NO-COPY, :COPY-SLOTS and :COPY-SET-SLOTS options.

DEFCONDITION (NAME SUPERS SLOTS &REST OPTIONS)

Defcondition is a handy shortcut for defining Common Lisp conditions. It supports all of #[H][define-condition]'s options and more.

DEPRECATED (&BODY BODY)

Wrap a function definition with `deprecated' to indicate that it should no longer be used. If the first element of body is a string, it will be used as additional documentation in the deprecation message. Foo example, (deprecated "Use bar instead." (defun foo-1 (x) (format t "~%FOO: ~A" x))) Will generate the message: ; warning FOO-1 has been deprecated. Use bar instead. at compile time whereever foo-1 is used.

GENERIC-FUNCTION

Private

ARGMAX (ITEMS FUNCTION &KEY KEY FILTER)

Returns the item in items with the biggest (#'>) value of function. See best-item for a generalization. See best-item for a generalization.

ARGMIN (ITEMS FUNCTION &KEY KEY FILTER)

Returns the item in items with the smallest (#'<) value of function.

BEST-ITEM (ITEMS FUNCTION &KEY KEY TEST FILTER (FILTER NIL) (TEST '>) (KEY 'IDENTITY))

Returns the item in items with the 'best' value of function where 'best' is determined by test. You can use filter to limit which items are compared and key to select out what part of each item actually gets tested. See argmin and argmax for specializations.

LENGTH-AT-LEAST-P (THING LENGTH)

Returns true if thing has no fewer than length elements in it.

LENGTH-AT-MOST-P (THING LENGTH)

Returns true if thing has no more than length elements in it.

SAMEP (THING-1 THING-2)

Compares two things and returns true if they are the same in the sense of being interchangable. Implementations use the special variable *samep-tolerance* to specify how close two things need to be in order to be 'the same'. See nearly-samep too.

SLOT-ACCESSOR

Private

SIZE (ABSTRACT-CONTAINER)

The Returns the number of items currently in the container.

SETFSIZE (NEW-VALUE OBJECT)

Set the Returns the number of items currently in the container.

Undocumented

ELEMENT (CONDITION)

SETFELEMENT (NEW-VALUE OBJECT)

PARENT (OBJECT)

SETFPARENT (NEW-VALUE OBJECT)

ROOT (OBJECT)

SETFROOT (NEW-VALUE OBJECT)

VARIABLE

Private

*SAMEP-TEST*

Used by samep to determine if two things are 'the same'. Defaults to #'equal

CLASS

Private

Undocumented

CL-CONTAINERS-TEST

TEST-DELETE-PRIORITY-QUEUE

TEST-DLIST-CONTAINER

TEST-PRIORITY-QUEUE

TEST-PRIORITY-QUEUE-ON-CONTAINER

TEST-TREES