Added a macro WITH-LAMBDA that's useful for wrapping one or more statements up into...
authorDaniel Gackle <danielgackle@gmail.com>
Sun, 12 Apr 2009 05:11:55 +0000 (22:11 -0700)
committerVladimir Sedach <vsedach@gmail.com>
Sun, 12 Apr 2009 23:10:31 +0000 (17:10 -0600)
src/lib/ps-macro-lib.lisp
src/package.lisp

index 27febcd..6399f6e 100644 (file)
@@ -88,3 +88,7 @@
 
 (defpsmacro elt (array index)
   `(aref ,array ,index))
+
+(defpsmacro with-lambda (()  &body body)
+  "Wraps BODY in a lambda so that it can be treated as an expression."
+  `((lambda () ,@body)))
index 3106bdc..f5e6e01 100644 (file)
       #:length
       #:null
       #:@
+      #:with-lambda
 
       ;; js runtime utils
       #:*ps-lisp-library*