Defstar is a collection of Common Lisp macros that can be used in place of defun
. Each macro has the same name as the form it replaces, with a star added at the end, e.g. defun*
. (the exception is the let*
replacement, which is called *let
The macros allow:
- easy inclusion of type declarations for arguments in lambda lists
- easy inclusion of return type declarations in function and method definitions
- easy declaration of variables as 'ignored', by the use of '_' as a placeholder variable in argument lists.
- easy inclusion of assertions for each argument and for the function's return value, thus allowing simple programming by contract.
See defstar's home page
for a detailed discussion of each macro, with usage examples.
Installation requires ASDF or Quicklisp. Defstar does not depend on any other libraries.
GPL3 convenience library