aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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