misc-utils

Method summary
class-string object
id obj
unify-equal x y
Function summary
alist-value elt alist &key (key (function second))
bigger-list? lst1 lst2
compiled-eval expression
component-present-p value
cons-if x lst
deep-member elt lst &key (test (function eql))
directory-pathname-p pathspec
first-atom lst
last-atom lst
last-elt lst
quit-lisp
remove-if-member items sequence &key (test (function eql)) (key (function identity))
substitute-or-cons new list &key (test (function equal)) (key (function first))
xor &rest els
>1 lst
Macro summary
cond-let &body body
let-values vars expr &body body
none &rest args
pp &body body
ppfc &body body
print-expansion macro-call
print-values &rest symbols
safe-setf variable value
when-let vars-and-tests then-clause &optional else-clause
when-let* vars-and-tests then-clause &optional else-clause
while test &body body
id   obj  [Generic function]

Return the id of the given object.

unify-equal   x y  [Generic function]

Return t if x and y are equal when matched in unification.

class-string   object  [Generic function]

Returns the class-name of the object as a string in lower case

deep-member   elt lst &key (test (function eql))  [Function]

Recursively check whether an element can be found in a list. Returns T or NIL.

bigger-list?   lst1 lst2  [Function]

More efficient function than comparing lengths of lists, capable of handling cons-lists.

first-atom   lst  [Function]

Recursively fetch the first atom of a list.

last-atom   lst  [Function]

recursively fetch the last atom in a list.

cons-if   x lst  [Function]

If x, then cons x in lst.

alist-value   elt alist &key (key (function second))  [Function]

Returns the second element of an alist if found.

last-elt   lst  [Function]

Fetch the last element of a list.

>1   lst  [Function]

Checks whether a list is bigger than 1.

substitute-or-cons   new list &key (test (function equal)) (key (function first))  [Function]

Substitute an alist-element if one already exists, cons it if it does not.

remove-if-member   items sequence &key (test (function eql)) (key (function identity))  [Function]

Remove all elements that are member of the items.

xor   &rest els  [Function]
component-present-p   value  [Function]
directory-pathname-p   pathspec  [Function]
compiled-eval   expression  [Function]

Like eval, but ensures that the expression is compiled before evaluation.

Can be used in systems where eval performs interpretation instead of compilation. Warning: Compilation is not always better, especially not for one-shot evaluations. The reason is that execution speed is compilation + execution, not just execution. Only if compilation + execution < interpretation, it is a good idea to use compiled-eval.

quit-lisp    [Function]
let-values   vars expr &body body  [Macro]

Easier to remember/write replacement for multiple-value-bind.

safe-setf   variable value  [Macro]

Only setfs the variable when it was nil.

none   &rest args  [Macro]
pp   &body body  [Macro]

Name-value pretty-printer shorthand.

ppfc   &body body  [Macro]

Function call pretty-printer shorthand.

print-values   &rest symbols  [Macro]

for each symbol passed it prints a 'name: value' line.

print-expansion   macro-call  [Macro]

Pretty print the macro-expansion of a macro-call.

when-let*   vars-and-tests then-clause &optional else-clause  [Macro]

If a value can be found for all vars, then execute the then-clause.

cond-let   &body body  [Macro]
when-let   vars-and-tests then-clause &optional else-clause  [Macro]

If a value can be found for all vars, then execute the then-clause.

while   test &body body  [Macro]

Easier to read than do macro.