---
 binding.lisp |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/binding.lisp b/binding.lisp
index 36d92bc..19c3750 100644
--- a/binding.lisp
+++ b/binding.lisp
@@ -91,3 +91,19 @@ PROGN."
          (when ,(caar binding-list)
            ,@(bind (cdr binding-list) forms))))))
 
+(defmacro let@ (name bindings &body body)
+    "LET@ is RnRS' LET.
+
+BINDINGS is a list of bindings of the form:
+
+ ((argument-1 initial-form-1)
+  (argument-2 initial-form-2)
+  ...
+  (argument-n initial-form-n))
+
+LET@ creates a local function named NAME with lambda-list
+(argument-1 argument-2 ... argument-n) and body BODY. This
+function is then called with the evaluations of the intitial
+forms as arguments."
+  `(labels ((,name ,(mapcar #'first bindings) ,@body))
+     (,name ,@(mapcar #'second bindings))))
-- 
1.7.10.4


_______________________________________________
alexandria-devel mailing list
alexandria-devel@common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel

Reply via email to