Quickutilβ

Lisp utilities on demand

Fork me on GitHub
search

There are 7 utilities.

void v1.0

Do absolutely nothing, and return absolutely nothing.

Provides
void
Source Code
 
ensure-boolean v1.0

Convert x into a Boolean value.

Provides
ensure-boolean
Source Code
 
letf* v1.0

Given a list of bindings whose keys are places and whose values are forms, set them for the duration of body, but restore their values (as visible upon evaluation of this macro) upon completion. The restoration is ensured with unwind-protect.

Provides
letf*
Requires
zip, appendf
Source Code
 
let1 v1.0

Bind VAR to VAL within BODY. Equivalent to LET with one binding.

Provides
let1
Source Code
 
defaccessor v1.0

Define the function named name just as with a normal defun. Also define the setter (setf name). The form to be set (i.e., the place) should be wrapped in the local macro accesses. For example,

CL-USER> (let ((x 0)) (defaccessor saved-x () (accesses x))) SAVED-X (SETF SAVED-X) CL-USER> (saved-x) 0 CL-USER> (setf (saved-x) 5) 5 CL-USER> (saved-x) 5

Provides
defaccessoraccesses
Requires
with-gensyms, parse-body
Source Code
 
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