Common Lisp Package: CL-NUM-UTILS.UTILITIES

README:

FUNCTION

Public

AS-SIMPLE-FIXNUM-VECTOR (SEQUENCE &OPTIONAL COPY?)

Convert SEQUENCE to a SIMPLE-FIXNUM-VECTOR. When COPY?, make sure that the they don't share structure.

FIXNUM? (OBJECT)

Check of type of OBJECT is fixnum.

GENERATE-SEQUENCE (RESULT-TYPE SIZE FUNCTION)

Like MAKE-SEQUENCE, but using a function to fill the result.

WITHIN? (LEFT VALUE RIGHT)

Return non-nil iff value is in [left,right).

MACRO

Public

CHECK-TYPES ((&REST ARGUMENTS) TYPE)

CHECK-TYPE for multiple places of the same type. Each argument is either a place, or a list of a place and a type-string.

DEFINE-WITH-MULTIPLE-BINDINGS (MACRO &KEY (PLURAL (INTERN (FORMAT NIL ~aS MACRO))) (DOCSTRING (FORMAT NIL Multiple binding version of ~(~a~). MACRO)))

Define a version of MACRO with multiple arguments, given as a list. Application of MACRO will be nested. The new name is the plural of the old one (generated using format by default).

EXPANDING (&BODY BODY)

Expand BODY. Useful for generating code programmatically.

GETHASH* (KEY HASH-TABLE &OPTIONAL (DATUM Key not found.) &REST ARGUMENTS)

Like GETHASH, but checking that KEY is present and raising the given error if not.

SPLICE-AWHEN (TEST &BODY FORMS)

Similar to splice-when, but binds IT to test.

SPLICE-WHEN (TEST &BODY FORMS)

Similar to when, but wraps the result in list. Example: `(,foo ,@(splice-when add-bar? bar))

UNLESSF (PLACE VALUE-FORM &ENVIRONMENT ENVIRONMENT)

When PLACE is NIL, evaluate VALUE-FORM and save it there.