Permalink
Browse files

Making apply-contract accept zero args

  • Loading branch information...
1 parent 434954e commit 37a626be009e58517356050633e82b4889dfd0d6 @fogus committed Mar 4, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/trammel/core.clj
View
@@ -118,8 +118,8 @@
(if (:hooked (meta f))
f
(with-meta
- (fn [m & args]
- (if-let [contract (-> m meta :contract)]
+ (fn [& [m & args]]
+ (if-let [contract (and m (-> m meta :contract))]
((partial contract identity) (apply f m args))
(apply f m args)))
{:hooked true})))

0 comments on commit 37a626b

Please sign in to comment.