Common Lisp Package: COM.CLEARLY-USEFUL.ASSOCIATIVE-PROTOCOL

Interface to the associative protocol

README:

FUNCTION

Public

COLLECTION-P (OBJECT)

test if object implements COLLECTION

GETKEY (OBJECT KEY &OPTIONAL DEFAULT)

calls associative on object. if the result contains key, returns value-for-key, else default

GENERIC-FUNCTION

Public

ALL-KEYS (O)

a seq of all keys in o

ALL-KEYS-AND-VALUES (O)

return a seq of proper lists in the form (key value)

ALL-VALUES (O)

a seq of all values in o

ASSOCIATIVE (OBJECT)

convert an object to ASSOCIATIVE protocol, or error.

CONTAINS-KEY-P (O K)

whether o contains k

EMPTY (O)

an empty version of this collection

EMPTY-P (O)

wether this collection is empty

VALUE-FOR-KEY (O K)

returns the value of k in o and t, or (values nil nil)