Permalink
Browse files

Removed default argument from defconstrainedtype

  • Loading branch information...
1 parent 4f3afc2 commit cb2501827bdbbd765541572c94acec7bf36f81c4 @frenchy64 frenchy64 committed Nov 30, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/trammel/core.clj
View
@@ -271,8 +271,7 @@
(defmacro defconstrainedtype
[name slots invariants & etc]
- (let [fields (->> slots (partition 2) (map first) vec)
- defaults (->> slots (partition 2) (map second))
+ (let [fields (vec slots)
ctor-name (symbol (str name \.))
factory-name (symbol (str "new-" name))]
`(do
@@ -284,7 +283,6 @@
~(str "Invariant contract for " name)
[{:keys ~fields :as m#}] ~invariants)]
(defconstrainedfn ~factory-name
- ([] [] (~ctor-name ~@defaults))
(~fields ~invariants
(~ctor-name ~@fields))))
~name)))

0 comments on commit cb25018

Please sign in to comment.