Common Lisp Package: ELEPHANT-UTILS

README:

FUNCTION

Public

ELE-THREAD-HASH-KEY

This routine has to return something unqiue about the thread which can serve as a hash key.

LAUNCH-BACKGROUND-PROGRAM (DIRECTORY PROGRAM &KEY (ARGS NIL))

Launch a program in a specified directory - not all shell interfaces or OS's support this

MKLIST (ELTS)

Make sure the argument is a list or make it a list if it's an atom

REMOVE-INDEXED-ELEMENT-AND-ADJUST (IDX ARRAY)

Remove element at idx and adjust the array to reduce array length by one

SUBSETS (SIZE LIST)

Generate subsets of size n from the list; the last subset has the remaining elements if size does not represent an equal division

Undocumented

COPY-DIRECTORY (SOURCE-DIR TARGET-DIR)

COPY-FILE (SOURCE-PATH TARGET-PATH)

COPY-FILE-TO-DIR (SOURCE-PATH TARGET-DIR)

CREATE-TEMP-DIRNAME (HINT)

CREATE-TEMP-FILENAME (HINT)

CURRY (FN ARG)

ELE-MAKE-FAST-LOCK

ELE-MAKE-LOCK

KILL-BACKGROUND-PROGRAM (PROCESS-HANDLE)

REMOVE-KEYWORDS (KEYWORDS LIST)

Private

APPEND-SUBLISTS (LIST)

Takes a list of lists and appends all sublists

Undocumented

CONCAT-SEPARATED-STRINGS (SEPARATOR &REST LISTS)

MACRO

Public

AIF (PRED DEFAULT ALT)

Anaphoric if

AWHEN (PRED &REST BODY)

Anaphoric when

DO-SUBSETS ((SUBSET SUBSET-SIZE LIST) &BODY BODY)

Look over subsets of the list

IFRET (PRED ALT)

If pred is non-null, return the value, otherwise return the alternate value

WITH-INTERRUPTS (&BODY BODY)

Cancels effect of surrounding (in dynamic scope sense) without-interrupts. Works only in SBCL.

WITHOUT-INTERRUPTS (&BODY BODY)

Run BODY with interrupts disabled.

Undocumented

ELE-WITH-FAST-LOCK ((LOCK &REST IGNORED) &BODY BODY)

ELE-WITH-LOCK ((LOCK &REST IGNORED) &BODY BODY)

WITH-GENSYMS (SYMS &BODY BODY)

Private

Undocumented

IN-DIRECTORY ((DIR) &BODY BODY)