Common Lisp Package: COM.CLEARLY-USEFUL.GENERIC-COLLECTION-INTERFACE

README:

FUNCTION

Public

COLLECTION-P (OBJECT)

test if object implements COLLECTION

COUNTABLE-P (OBJECT)

test if object implements COUNTABLE

FOLDABLE-P (OBJECT)

test if object implements FOLDABLE

GETKEY (OBJECT KEY &OPTIONAL DEFAULT)

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

INDEXABLE-P (OBJECT)

test if object implements INDEXABLE

REDUCEABLE-P (OBJECT)

test if object implements REDUCEABLE

SEQ-P (OBJECT)

test if object implements SEQ

SEQ-TO-LIST (SEQ)

a fresh list will all elements of seq

SEQABLE-P (OBJECT)

test if object implements SEQABLE

Undocumented

FILTERING (PRED)

FOLD (REDUCEFN COLLECTION &KEY (DIVIDE-BY 512) (COMBINE-WITH REDUCEFN))

FOLD-LEFT (FN COLLECTION &KEY (INITIAL-VALUE (FUNCALL FN)))

FOLDER (COLLECTION TRANSFORMER)

INTO (COLL REDUCEABLE)

MAPCATTING (F)

MAPPING (FN)

MONOID (FN EPSILON)

REDUCED (V)

REDUCER (COLLECTION TRANSFORMER)

Private

%COUNTABLE-ASSOCIATIVE-COUNTABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%COUNTABLE-ASSOCIATIVE-LENGTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%COUNTABLE-SEQUENCE-COUNTABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%COUNTABLE-SEQUENCE-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%COUNTABLE-SEQUENCE-LENGTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%FOLDER-COLL (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%FOLDER-TRANSFORMER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%NEXT-RANGE (RANGE)

return the next range by incrementing the lower bound of range, or nil

%RANGE-HIGH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%RANGE-LOW (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%RANGE-SIZE (RANGE)

the number of elements in a range

%REDUCER-COLL (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%REDUCER-TRANSFORMER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%SEQ-COUNTABLE-FULLY-COUNTED (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%SEQ-COUNTABLE-SEQ (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%SEQ-COUNTABLE-UBOUND (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ASSOCIATIVE-P (OBJECT)

test if object implements ASSOCIATIVE

Undocumented

%%.DEFPUN.FOLD-VECTOR (KERNEL0 V N COMBINER REDUCER)

%ADJUSTABLE (VECTOR &OPTIONAL (PAD 0))

%ASSOCIATIVE-TO-INDEXABLE (ASSOC)

%COUNT-SEQ (SEQ)

SETF%COUNTABLE-ASSOCIATIVE-COUNTABLE (NEW-VALUE INSTANCE)

SETF%COUNTABLE-ASSOCIATIVE-LENGTH (NEW-VALUE INSTANCE)

%COUNTABLE-ASSOCIATIVE-P (OBJECT)

SETF%COUNTABLE-SEQUENCE-COUNTABLE (NEW-VALUE INSTANCE)

SETF%COUNTABLE-SEQUENCE-INDEX (NEW-VALUE INSTANCE)

SETF%COUNTABLE-SEQUENCE-LENGTH (NEW-VALUE INSTANCE)

%COUNTABLE-SEQUENCE-P (OBJECT)

%COUNTABLE-SEQUENCE-SIZE (C)

%COUNTABLE-TO-ASSOCIATIVE (COUNTABLE)

%COUNTABLE-TO-SEQ (COUNTABLE)

%DUP-HASH (IT)

%EMPTY-HASH (IT)

SETF%FOLDER-COLL (NEW-VALUE INSTANCE)

%FOLDER-P (OBJECT)

SETF%FOLDER-TRANSFORMER (NEW-VALUE INSTANCE)

%HASH-CONJ! (HT SEQ)

%INTERFACE-PACKAGE (NAME DOCUMENTATION &REST EXPORTS)

%NEXT-COUNTABLE-SEQUENCE (C)

SETF%RANGE-HIGH (NEW-VALUE INSTANCE)

SETF%RANGE-LOW (NEW-VALUE INSTANCE)

%RANGE-P (OBJECT)

%REDUCE (FN COLLECTION &KEY (INITIAL-VALUE (FUNCALL FN)))

SETF%REDUCER-COLL (NEW-VALUE INSTANCE)

%REDUCER-P (OBJECT)

SETF%REDUCER-TRANSFORMER (NEW-VALUE INSTANCE)

%SEQ-COUNTABLE-CONTAINS-INDEX (SC INDEX)

%SEQ-COUNTABLE-COUNT (SC)

SETF%SEQ-COUNTABLE-FULLY-COUNTED (NEW-VALUE INSTANCE)

%SEQ-COUNTABLE-P (OBJECT)

SETF%SEQ-COUNTABLE-SEQ (NEW-VALUE INSTANCE)

SETF%SEQ-COUNTABLE-UBOUND (NEW-VALUE INSTANCE)

%SEQ-INDEXABLE-BY (SEQ N)

%SEQ-NTH-OR-ERROR (SEQ N)

%SEQ-NTH-OR-NIL-WITH-VALUES (SEQ N)

%SEQ-TO-ASSOCIATIVE (SEQ)

%SEQ-TO-COUNTABLE (SEQ)

%SEQ-TO-LIST (SEQ)

%VECTOR-CONJ! (ADJUSTABLE-VECTOR VAL)

COPY-%COUNTABLE-ASSOCIATIVE (INSTANCE)

COPY-%COUNTABLE-SEQUENCE (INSTANCE)

COPY-%FOLDER (INSTANCE)

COPY-%RANGE (INSTANCE)

COPY-%REDUCER (INSTANCE)

COPY-%SEQ-COUNTABLE (INSTANCE)

FOLD-VECTOR (V N COMBINER REDUCER)

MAKE-%COUNTABLE-ASSOCIATIVE (&KEY ((LENGTH DUM388) NIL) ((COUNTABLE DUM389) NIL))

MAKE-%COUNTABLE-SEQUENCE (&KEY ((LENGTH DUM238) NIL) ((INDEX DUM239) NIL) ((COUNTABLE DUM240) NIL))

MAKE-%FOLDER (&KEY ((COLL DUM32) NIL) ((TRANSFORMER DUM33) NIL))

MAKE-%RANGE (&KEY ((LOW DUM0) NIL) ((HIGH DUM1) NIL))

MAKE-%REDUCER (&KEY ((COLL DUM101) NIL) ((TRANSFORMER DUM102) NIL))

MAKE-%SEQ-COUNTABLE (&KEY ((SEQ DUM556) NIL) ((UBOUND DUM557) NIL) ((FULLY-COUNTED DUM558) NIL))

REDUCE-INDEXABLE (R FN SEED)

REDUCE-SEQ (R FN SEED)

REDUCEABLE-REDUCE (FN COLLECTION &KEY (INITIAL-VALUE (FUNCALL FN)))

SUBVEC (VEC START &OPTIONAL (END (LENGTH VEC)))

MACRO

Public

DOINDEXABLE ((VAR FORM &OPTIONAL RETURN-CLAUSE) &BODY BODY)

bind var to each item in (element-at indexed n) and execute body. where n is 0..(count-elements indexed) and indexed is (indexable form) similar to dolist.

DOSEQ ((VAR FORM &OPTIONAL RETURN-CLAUSE) &BODY BODY)

bind var to each item in (seq form) and execute body. similar to dolist.

Private

DEFINE-INTERFACE-PACKAGE (NAME DOCUMENTATION &REST EXPORTS)

create a package named name with documentation which uses :cl and *package*, exporting the symbols of exports.

Undocumented

WITH-FOLD-KERNEL (&BODY BODY)

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

COUNT-ELEMENTS (O)

the number of elements in o

COUNTABLE (OBJECT)

convert an object to COUNTABLE protocol, or error.

COUNTED-P (O)

whether a collection is counted in constant time

ELEMENT-AT (O INDEX)

the element of o at index, or raise an error

EMPTY (O)

an empty version of this collection

EMPTY-P (O)

wether this collection is empty

INDEXABLE (OBJECT)

convert an object to INDEXABLE protocol, or error.

SEQ (O)

return a seq (or nil if count = 0) or error

TAIL (O)

the rest of the collection or nil

VALUE-FOR-KEY (O K)

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

Undocumented

COLL-FOLD (SELF N COMBINEF REDUCEF)

COLL-REDUCE (SELF FN SEED)

CONJ (A VAL)

CLASS

Private

%RANGE

an immutable integer range from low to high, exclusive.

Undocumented

%COUNTABLE-ASSOCIATIVE

%COUNTABLE-SEQUENCE

%FOLDER

%REDUCER

%SEQ-COUNTABLE