Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed default argument from defconstrainedtype

  • Loading branch information...
commit cb2501827bdbbd765541572c94acec7bf36f81c4 1 parent 4f3afc2
@frenchy64 frenchy64 authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/trammel/core.clj
View
4 src/trammel/core.clj
@@ -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)))
Please sign in to comment.
Something went wrong with that request. Please try again.