Quickutilβ

Lisp utilities on demand

Fork me on GitHub
search

There are 8 utilities.

until v1.0

Executes body until expression is true.

Provides
until
Source Code
 
while v1.0

Executes body while expression is true.

Provides
while
Requires
until
Source Code
 
extract-function-name v1.0

Useful for macros that want to mimic the functional interface for functions like #'eq and 'eq.

Provides
extract-function-name
Source Code
 
switch v1.0

Dispatch to different branches of code based off of the value of an expression.

Provides
switcheswitchcswitch
Requires
with-gensyms, extract-function-name
Source Code
 
whichever v1.0

Evaluates exactly one of possibilities, chosen at random.

Provides
whichever
Requires
with-gensyms
Source Code
 
xor v1.0

Evaluates its arguments one at a time, from left to right. If more then one argument evaluates to a true value no further datums are evaluated, and nil is returned as both primary and secondary value. If exactly one argument evaluates to true, its value is returned as the primary value after all the arguments have been evaluated, and t is returned as the secondary value. If no arguments evaluate to true nil is retuned as primary, and t as secondary value.

Provides
xor
Requires
with-gensyms
Source Code
 
nth-value-or v1.0

Evaluates form arguments one at a time, until the nth-value returned by one of the forms is true. It then returns all the values returned by evaluating that form. If none of the forms return a true nth value, this form returns nil.

Provides
nth-value-or
Requires
with-gensyms, once-only
Source Code
 
multiple-value-prog2 v1.0

Evaluates first-form, then second-form, and then forms. Yields as its value all the value returned by second-form.

Provides
multiple-value-prog2
Source Code