Bind extends the idea of of let and destructing to provide a uniform syntax for all your accessor needs. It combines let, destructuring-bind, with-slots, with-accessors, structure editing, property or association-lists, and multiple-value-bind and a whole lot more into a single form. The user guide has all the details but here is example to whet your appetite:
(bind ((a 2)
((b &rest args &key (c 2) &allow-other-keys) '(:a :c 5 :d 10 :e 54))
((:values d e) (truncate 4.5)))
(list a b c d e args))
==> (2 :A 5 4 0.5 (:C 5 :D 10 :E 54)) Bind is especially handy when you have more than one layer of multiple-value-bind or destructuring-bind. Since bind is a single form, you don't end up too far off to the right in editor land.
Bind is released under the MIT license.
Use the developer mailing list for any questions or comments regarding bind.
A darcs repository is available. The command to get bind is:
darcs get http://common-lisp.net/project/metabang-bind/ metabang-bind is also ASDF installable. Its CLiki home is right where you'd expect.
There's also a handy gzipped tar file.
28 May 2009 - added :structure/rw binding form; updated webpage to link to the user's guide
1 Dec 2007 - Added support for array destructuring (Thanks to Tamas Papp for the idea)
15 Nov 2007 - New user guide; bind handles structures and property lists and is now extensible!
13 Nov 2005 - Initial webpage n' stuff.