aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscgilardi <scgilardi@gmail.com>2008-05-24 01:54:18 +0000
committerscgilardi <scgilardi@gmail.com>2008-05-24 01:54:18 +0000
commit3b1f6ff5ab1e33022cac5dfffc29d01f4c61f209 (patch)
tree46d63fba3c7725dca25430a570e8467f712a80d5
parent296c53195a03010d62c6ded80ebac334fd88e7f8 (diff)
def.clj: add defstruct-
-rw-r--r--def.clj5
1 files changed, 5 insertions, 0 deletions
diff --git a/def.clj b/def.clj
index c1000890..2af9dd96 100644
--- a/def.clj
+++ b/def.clj
@@ -36,6 +36,11 @@
[name & decls]
(list* `defvar (with-meta name (assoc (meta name) :private true)) decls))
+(defmacro defstruct-
+ "Same as defstruct but yields a private definition"
+ [name & decls]
+ (list* `defstruct (with-meta name (assoc (meta name) :private true)) decls))
+
(defmacro defalias
"Defines an alias for a var: a new var with the same value and metadata
as another with the exception of :namespace, :name, :file, :line, and