[PATCH] PROG1-LET
Benjamin Saunders <ralith <at> gmail.com>
2012-04-07 20:25:00 GMT
PROG1-LET is a binding macro modeled closely after WHEN-LET and
friends, which I have regularly found useful in code to implement the
"create, modify, return" pattern common in some imperative
code. As a simple and, I believe, widely useful macro, I'd like to see
this enter into Alexandria proper. Docstring follows:
Creates new variable bindings and executes FORMS, returning the
initial value of the first binding.
BINDINGS must be either single binding of the form:
(variable initial-form)
or a list of bindings of the form:
((variable initial-form)
(variable-2 initial-form-2)
...
(variable-n initial-form-n))
All initial-forms are executed sequentially in the specified order,
then all the variables are bound to the corresponding values and FORMS
are executed as an implicit PROGN. Finally, the value returned by
INITIAL-FORM is returned.
From cbccc782f34477c924ea8ff7b6000cd52511a768 Mon Sep 17 00:00:00 2001
From: Benjamin Saunders <ralith <at> gmail.com>
Date: Sat, 7 Apr 2012 13:19:19 -0700
Subject: [PATCH] Added PROG1-LET
(Continue reading)