common-idioms

common-idioms is a set of utilities that Brian Mastenbrook uses frequently during his development. As of version 3, it provides the following functions/macros:

New in version 2 are the following:

This last one in particular needs some explanation:

(let ((x 1)
      (y 2))
  (let-env env
           (append
            (let ((x 3)
                  (y 4))
              (setf x 5)
              (env (x)
                   (setf x 6)
                   (setf y 7))
              (list x y)) (list x y)))) => (5 7 6 2)

This macro is unfortunately not totally portable as it currently depends on the order of macro expansion; however, if there is a way to make it portable, I'd be interested.

The grossly unportable EXPAND-ONLY function has been updated as well; it now can take an argument of T to mean "show all macro expansions", and any expansions encountered that don't appear to be present in the form or any of its recursive expansions will be returned the second value as an association list. (This is often useful with SETF, which can transform back and forth to SETQ.)

New in version 3 are the following:

There is Albert-generated documentation available.

Download ASDF package from http://www.unmutual.info/software/old/common-idioms/common-idioms-3.tar.gz

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively